Slack Engineering

slack.engineering · Company blog · on HN since 2016

Slack's engineering blog covers its infrastructure, including PHP and Hacklang, Vitess datastores, Electron and memory use.

What HN saysHN commenters share its posts on reducing the desktop app's memory footprint, real-time messaging and recommendations as favorite engineering reads.
281HN people shared it
97linked it in comments
289stories submitted
7.5Kstory points
3 months agolast shared
2016people per year2026

Most-shared posts

  1. 1
    Taking PHP Seriously
    22 people · 864 points · first shared 2016 · 652 comments on HN
  2. 2
    Scaling Datastores at Slack with Vitess
    15 people · 120 points · first shared 2020 · 34 comments on HN
  3. 3
    Reducing Slack’s memory footprint
    10 people · 66 points · first shared 2017 · 44 comments on HN
  4. 4
    Building Hybrid Applications with Electron
    10 people · 15 points · first shared 2016 · discussion on HN
  5. 5
    Syscall Auditing at Scale
    9 people · 288 points · first shared 2016 · 38 comments on HN
  6. 6
    Remote Development at Slack
    8 people · 14 points · first shared 2022 · 1 comments on HN
  7. 7
    Hacklang at Slack: A Better PHP
    8 people · 3 points · first shared 2020 · discussion on HN
  8. 8
  9. 9
    Taking PHP Seriously (2016)
    7 people · 139 points · first shared 2020 · 138 comments on HN
  10. 10
    How We Design Our APIs at Slack
    7 people · 31 points · first shared 2021 · 1 comments on HN
  11. 11
    Real-Time Messaging
    7 people · 8 points · first shared 2023 · discussion on HN
  12. 12
    Deploys at Slack
    6 people · 375 points · first shared 2020 · 136 comments on HN
  13. 13
    Scaling Slack’s Job Queue with Kafka
    6 people · 25 points · first shared 2017 · discussion on HN
  14. 14
    Building the Next Evolution of Cloud Networks at Slack
    6 people · 17 points · first shared 2020 · discussion on HN
  15. 15
    Role Management at Slack
    6 people · 12 points · first shared 2021 · 2 comments on HN

What HN people wrote when they linked it

raw_anon_1111 · 2026-03-23
Funny enough, I just replied to someone who posted a link to the great lengths Slack is going through to make it use less memory on the desktop. https://slack.engineering/reducing-slacks-memory-footprint/ When the obvious answer I gave about how to reduce the memory footprint and make it more performant was “to stop using fucking [web technologies]” and create a native app But the question I always ask people who say that it’s mean old Apple keeping PWAs back, why is it that all of these same companies see a need to create an app for Android?
01HNNWZ0MV43FF · 2026-03-22
The Slack notification flowchart is an old favorite: https://slack.engineering/reducing-slacks-memory-footprint/
okeuro49 · 2023-09-09
I like PHP, because it has a familiar C-like syntax and great tooling, like composer, and frameworks, like Symfony. The language has warts, but it's improving. I think its strength is its architecture, namely shared-nothing state and concurrency. [1] [1] https://slack.engineering/taking-php-seriously/
fzliu · 2022-10-07
Hashes are fine, but to say that "vectors are over" is just plain nonsense. We continue to see vectors as a core part of production systems for entity representation and recommendation (example: https://slack.engineering/recommend-api) and within models themselves (example: multimodal and diffusion models). For folks into metrics, we're building a vector database specifically for storing, indexing, and searching across massive quantities of vectors (https://github.com/milvus-io/milvus), and we've seen close to exponential growth in terms of total downloads. Vectors are just getting started.
nithayakumar · 2022-08-17
Facebook definitely does it. Thats where we first learned about this way of working. Some bigger tech companies have actually written about it (see links below) but a list of ones that we've seen with this kind of infra include LinkedIn, Shopify, Dropbox, Stripe, Slack, DataDog, and Palantir - to name a few. Eng blog links: LinkedIn: https://engineering.linkedin.com/blog/2021/building-in-the-cloud-with-… Shopify: https://shopify.engineering/modelling-developer-infrastructure-teams Slack: https://slack.engineering/development-environments-at-slack/ Doximity: https://technology.doximity.com/articles/github-codespaces-is-great-bu…
gkaemmer · 2021-12-17
Yeah, although mostly variations on that basic premise. Airbnb Himeji: https://medium.com/airbnb-engineering/himeji-a-scalable-centralized-sy… Carta's AuthZ system: https://medium.com/building-carta/authz-cartas-highly-scalable-permiss… Slack's architecture is a bit different, but solves some of the same challenges: https://slack.engineering/role-management-at-slack/ I've also talked to a number of teams who just implemented pattern 3 internally with a custom service. Generally they've determined it's worth it to centralize all authorization data (like roles, groups, etc) into one place and perform ALL permission checks there. There are also some companies building essentially Zanzibar clones, like Auth0, Authzed, Ory Keto, and a few more.
jv22222 · 2021-09-14
PHP is a primary server side stack in lots of startups and unicorns. I've used it as a main server side stack in every startup I've worked in for the past 20 years. Others use it like Airbnb, Facebook, Slack, and many more. This is a good read: https://slack.engineering/taking-php-seriously/ A lot of people don't like it because of how easy it is to get into. There was similar feeling about JavaScript back in the early 2000's. People felt that it was just script kiddies that copy/pasted JavaScript so it was not respectable (at that time). BTW Laravel, and the Laravel eco-system has also helped PHP become a fantastic option for any project no matter how big or small.
mrdonbrown · 2020-07-29
> Sad that it doesn't seem to offer any deployment visibility options. I would love to connect it to our CI/CD system to see what changes are currently being rolled out. Deployment visibility is what my startup - https://sleuth.io - is trying to focus on, with light workflow sprinkled in. Other options I've found are usually tracking as a side feature of a tool like Sentry, Rollbar, or GitHub, or a completely custom app like what Slack built in https://slack.engineering/deploys-at-slack-cd0d28c61701
bsmith0 · 2019-08-07
See this in regards to the new Slack application: https://slack.engineering/rebuilding-slack-on-the-desktop-308d6fe94ae4… It's much faster now. Also, I would be hard pressed to find a 5 sec increase in an electron app vs a native app. This article is also worth a read, focusing on why Electron fills a necessary niche: https://medium.com/@felixrieseberg/defeating-electron-e1464d075528,
pushtheenvelope · 2019-02-12
Hack layered a sane type system on the existing runtime, but the changes above are all about runtime logic. These type coercions lead to many subtle bugs in PHP programs. What this demonstrates is that one can have a much safer programming language while keeping the key attributes of PHP that make it great: each web request having isolated state, concurrency model, and programmer workflow (ref. https://slack.engineering/taking-php-seriously-cf7a60065329). Yes, I'm not necessarily advocating for any web developer to start building in Hack now -- mainly because it lacks PHP's rich ecosystem. The good folks working on the PHP language may be interested in these changes though.
dictum · 2018-02-03
Without the heated tone ("entitlement in tech conversations") there's often no response to a valid complaint. We only get clear explanations from a company's engineers after a discussion is raised. > In this case, clearly there are material differences in video chat performance across browsers, or else why would Slack force Chrome support? I look forward to a post on https://slack.engineering detailing the challenges. I'm not demanding a response, it's just a wish. My decision to use a product takes certain principles into account; Slack is the kind of product that is often chosen for you by your company/open source project/community. A bit of "entitlement" — not meant as scare quotes, I just don't share the viewpoint – makes sense here, because sometimes you can't just choose not to use it.
combatentropy · 2017-11-30
> Would anyone recommend it Slack would, https://slack.engineering/taking-php-seriously-cf7a60065329
geofft · 2017-09-19
Flask is really good (and my preferred web framework, and full disclosure, I have forgotten how to write PHP), but it fails very badly at "no shared state," and depending on what GP meant by "a request" / "a response", it fails at that too. A Flask process handles an indefinite number of requests and responses; the built-in server handles them serially, and doing otherwise brings in either threads (and shared state) or multiple processes. The Slack article posted elsewhere in these comments https://slack.engineering/taking-php-seriously-cf7a60065329 has some excellent arguments about why PHP's approach is different in interesting ways.
lars_francke · 2024-05-17
I contacted support to opt out.. Here is the answer. "Hi there, Thank you for reaching out to Slack support. Your opt-out request has been completed. For clarity, Slack has platform-level machine learning models for things like channel and emoji recommendations and search results. We do not build or train these models in such a way that they could learn, memorize, or be able to reproduce some part of customer data. Our published policies cover those here (https://slack.com/trust/data-management/privacy-principles), and as shared above your opt out request has been processed. Slack AI is a separately purchased add-on that uses Large Language Models (LLMs) but does not train those LLMs on customer data. Slack AI uses LLMs hosted directly within Slack’s AWS infrastructure, so that customer data remains in-house and is not shared with any LLM provider. This ensures that Customer Data stays in that organization’s control and exclusively for that organization’s use. You can read more about how we’ve built Slack AI to be secure and private here: https://slack.engineering/how-we-built-slack-ai-to-be-secure-and-priva… Kind regards, Best regards,"
BillFranklin · 2024-02-22
Good luck folks! I'm glad there are projects trying to solve enterprise search. I guess the main problem is the "private" aspect, if I've understood your goals correctly. Since most SaaS products lock down the private data unless you pay enterprise fees for compliance tooling. For instance, if you want to ingest data from private Slack channels or Notion groups, you have to get the users in those groups to add your bot to them, otherwise there's no way of your service getting access to the data. It's possible, just a bad UX for users. That said, built-in search for most SaaS products built after 2015 is generally quite good (e.g. Slack has an internal Learning to Rank service for a while now, which makes their search excellent: https://slack.engineering/search-at-slack/), so you'd be solving for companies like Webex and Confluence where their internal search is not great. At companies like Google they have internal search across products, which is the ideal end state, but have the benefit that they own the source code for most of their internal products.
kmavm · 2021-05-18
I was Chief Architect at Slack from 2016 to 2020, and was privileged to work with the engineers who were doing the work of migrating to Vitess in that timeframe. The assumption that tenants are perfectly isolated is actually the original sin of early Slack infrastructure that we adopted Vitess to migrate away from. From some earlier features in the Enterprise product (which joins lots of "little Slacks" into a corporate-wide entity) to more post-modern features like Slack Connect (https://slack.com/help/articles/1500001422062-Start-a-direct-message-w… or Network Shared Channels (https://slack.com/blog/news/shared-channels-growth-innovation), the idea that each tenant is fully isolated was increasingly false. Vitess is a meta-layer on top of MySQL shards that asks, per table, which key to shard on. It then uses that information to maintain some distributed indexes of its own, and to plan the occasional scatter/gather query appropriately. In practice, simply migrating code from our application-sharded, per-tenant old way into the differently-sharded Vitess storage system was not a simple matter of pointing to a new database; we had to change data access patterns to avoid large fan-out reads and writes. The team did a great write-up about it here: https://slack.engineering/scaling-datastores-at-slack-with-vitess/
nik_0_0 · 2020-07-07
Super interesting post. Following blog links, the timeline in https://slack.engineering/all-hands-on-deck-91d6986c3ee also offers a look at the play by play. However, as far as I can read it, they have somewhat different views on the root cause? "Soon, it became clear we had stale HAProxy configuration files, as a result of linting errors preventing re-rendering of the configuration." vs. "The program which synced the host list generated by consul template with the HAProxy server state had a bug. It always attempted to find a slot for new webapp instances before it freed slots taken up by old webapp instances that were no longer running. This program began to fail and exit early because it was unable to find any empty slots, meaning that the running HAProxy instances weren’t getting their state updated. As the day passed and the webapp autoscaling group scaled up and down, the list of backends in the HAProxy state became more and more stale." Maybe a combination of the two?
Continuous · 2017-11-13
Use the language your team is familiar with! If it is PHP don't hesitate just because it is not "cool".. PHP was a great tool back in the day and today! PHP with a decent framework like Laravel [1] or Zend Framework [2] really works well and addresses all the features that you have listed (except the last 2). Uniquely among modern languages, * PHP was born in a web server *. Its strengths are tightly coupled to the context of request-oriented, server-side execution. We've managed to develop several complex apps over the last 10 years on PHP. For Web Socket support, we use Socket.IO or Firebase and it both really well together with PHP. If you choose PHP now, you are not alone. Many companies still choose PHP for their Web Application. Slack uses PHP for most of its server-side application logic [3] [1] https://laravel.com/ [2] https://framework.zend.com/ [3] https://slack.engineering/taking-php-seriously-cf7a60065329
ameliaquining · 2025-05-28
According to https://slack.engineering/building-hybrid-applications-with-electron/, Slack never used multiple different per-platform webviews. The earliest version of their desktop app was Mac-only and used the OS-native WebView API, but they switched to Electron at the same time they started work on making the app cross-platform. At the time, not only did Tauri not exist, but neither did the WebView2 API that it uses under the hood on Windows; they would have had to use the WebBrowser ActiveX control, which uses Internet Explorer's Trident engine and was already deprecated. So it's not so much that they rejected per-platform webviews, as that per-platform webviews were not yet really available as an option on desktop.
jimmyl02 · 2025-02-27
Based on the status report, it seems like it was related to a database disaster and mention recovering shards. Publicly they say they are using vitess[0] so I wonder if there was some issues there. I wonder if there will be a more detailed post-mortem, would be super interesting to learn more! [0] https://slack.engineering/scaling-datastores-at-slack-with-vitess/
evanelias · 2024-09-10
Slack has a few eng blog posts from last year which seem to indicate they still use Hack, among other languages. https://slack.engineering/hakana-taking-hack-seriously/ describes their open source enhanced Hack type checker, which is still actively maintained (most recent commit yesterday). And https://slack.engineering/slacks-migration-to-a-cellular-architecture/ mentions they use a mix of languages: "services in the user-facing request path are written in Hack, Go, Java, and C++"
dewey · 2024-06-25
You miss-understood a critical part: https://slack.engineering/how-we-built-slack-ai-to-be-secure-and-priva… Short summary on Twitter: > Slack AI – which is our generative AI experience natively built in Slack – is a separately purchased add-on that uses Large Language Models (LLMs) but does not train those LLMs on customer data. Because Slack AI hosts the models on its own infrastructure, your data remains in your control and exclusively for your organization’s use. It never leaves Slack’s trust boundary and no third parties, including the model vendor, will have access to it. https://twitter.com/SlackHQ/status/1791276788212998503
ayewo · 2024-06-19
I think you copy-pasted the wrong URL in your first link. Should be https://slack.engineering/balancing-old-tricks-with-new-feats-ai-power…
morgante · 2024-06-19
If you read the source article[0], they tried a rule-based approach first and the complexity exploded. [0] https://slack.engineering/balancing-old-tricks-with-new-feats-ai-power…
anymouse123456 · 2024-06-19
Misleading title. Maybe try this one? "Slack uses ASTs to convert test code from Enzyme to React with 22% success rate" This article is a poor summary of the actual article, which is at least linked to Slack's engineering blog [0]. [0] https://slack.engineering/balancing-old-tricks-with-new-feats-ai-power… [updated]
asah · 2024-02-07
yyy we're in violent agreement! interesting re reddit, that's really tiny! but again, I'm even more curious about how many underlying TPS this turns into, net of rules firing, notifications and of course bots that read and analyze this comment, etc. Still, this isn't a scaling issue because all of this stuff can be done async on read replicas, which means approx unlimited scale in a single-database-under-management (e.g. here's this particular comment ID, wait for it) Slack experiences 300K write QPS: https://slack.engineering/scaling-datastores-at-slack-with-vitess/
sgarland · 2024-02-05
> Integers don't scale because you need a central server to keep track of the next integer in the sequence. They most assuredly do scale. [0] Also, Slack is built on MySQL + Vitess [1], the same system behind PlanetScale, which internally uses integer IDs [2]. [0]: https://www.enterprisedb.com/docs/pgd/latest/sequences/#globally-alloc… [1]: https://slack.engineering/scaling-datastores-at-slack-with-vitess/ [2]: https://github.com/planetscale/discussion/discussions/366

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close