Hacker News new | past | comments | ask | show | jobs | submit login
Why WhatsApp Only Needs 50 Engineers for Its 900M Users (wired.com)
337 points by ghosh on Sept 16, 2015 | hide | past | web | favorite | 248 comments

Basically they're a silicon valley company who've done everything that's exactly the opposite of standard silicon valley advise -- bootstrapped for first few years, complete apathy or even aversion to silicon valley marketing (if you live in the valley and have no foreign connection, you probably didn't even know what whatsapp was before 2012 or so), built for all client platforms simultaneously (including blackberry and Nokia), focus on non-US markets first, built out on leased hardware instead of public cloud, a simple pay-for-use business model selling to consumers (before facebook bought them), deep aversion to ads (http://blog.whatsapp.com/245/Why-we-dont-sell-ads?) etc. The fact that their technology stack ended up being Erlang on FreeBSD is probably the least distinguishing feature about them.

I interviewed with them recently. They claimed their success was due to picking up Erlang.

Our YC company (Heysan, W07) was very similar to WhatsApp except we decided to shim mobile web into the IM networks of that time. We were closing our doors as they were just getting going, and we really liked what we saw of them. At that time we had pretty much re-written everything to be erlang - it definitely makes writing IM software easy to reason about. Interoping with the IM networks was very graceful in erlang.

To expand on this, I think a better question is why do other need so many more engineers for so many fewer users?

"built for all client platforms simultaneously"

And that's why it's strange that the article focuses on Erlang: Are all of the client apps written in Erlang?

Not at all. The client apps were written in their respective framework/languages.

Yes yes, I do believe there's some boosterism going on when their success is entirely attributed to Erlang/FreeBSD alone. Sure the stability and scalability of the backend may have been helped by using Erlang but the fact that they got to scale at all has to do with all these other business/cultural/timing/design factors that I mentioned above.

Btw, the one factor I forgot to mention above was the call to use phone numbers as the namespace for user identity. I believe they were one of the early ones, if not the first ones, who eschewed email and/or social login and went straight to phone number. That made them a direct replacement for SMS in large parts of the world where SMS costs were meaningfully expensive to the population. One more example of focusing outside the US market in general and outside of Valley bubble in particular.

I believe that would be impossible. Also, the client isn't required to do a lot of parallel work, it's just an end point for the two way communication with the server.

The servers, on the other hand, have to serve all the million users connected at any single moment. That requires a lot of parallelism, and that's the most likely place where Erlang was successful.

> bootstrapped for first few years

I recall whatsapp being free before it was for pay, how was it bootstrapped?

I recall paying for it in iOS, and getting a "it's free for a year" message on Android before the Facebook transaction.

they didn't take venture capital and instead self funded. even if you aren't generating revenue, you can bootstrap

And how did they pay expenses if they had no capital and no revenue?

Bootstrapping isn't no capital, it's no outside investment. The two founders had worked for Yahoo for years before quitting, they used their savings and kept expenses low.

WA came out iPhone exclusive (then later on extended the offering to BB).

iPhone was hugely popular in North America. BB, on the other hand, is hugely popular in Asia (and probably Europe...?) that consists of 3 most populous countries: China, India, Indonesia... guess who uses WA the most...?

Support for other platforms came out very late...

Comments in this thread are quite cringeworthy. People calling WhatsApp a simple application seem to fail to understand the cost of simplicity under such scale.

I don't think anyone commenting along these lines on HN is that ignorant. Everyone on here understands that anything executed at the WhatsApp/FB/Instagram sort of scale is going to present all sorts of tough problems and require software engineering know-how in spades.

However of all the various applications you could conceivably scale to hundreds of millions of users this is one of the simplest. I do not think acknowledging that is cringeworthy at all.

>However of all the various applications you could conceivably scale to hundreds of millions of users this is one of the simplest. I do not think acknowledging that is cringeworthy at all.

What other apps besides social networking and communication apps even get to hundreds of millions of user?

I guess "users" is a confusing concept, but a service like Cloudflare would be an example of a more complex application serving that scale of people.

Is cloudflare more complex or less? If I'm connecting through a CF proxy in North America and someone else is connecting through Europe, there's not really any state that needs to be synchronized between us. If I send a message to somebody in Europe, that obviously does need to be synced.

Actually there is state that might need to be synchronized between the two locations. The cached state of the page or other resources there. CF doesn't just do a blind proxy to the host, along with that it does a number of checks for common attacks and other misbehaving clients.

The NA data center can't decide how long to cache a page without consulting EU (and Asia, and SA, and etc.)? Obviously there is some shared global state (how else would each endpoint know where to proxy to?), but it seems unlikely every request passing through CF is mutating the same global database.

Having tossed the towel in trying to build a global CDN/caching system with relatively few endpoints some years ago, I can tell you that it's very complex. I can't speak to the complexity of something like WhatsApp, and so any comparison would be totally ignorant and anecdotal, but I am guessing that CloudFlare is orders of magnitude more complex than WhatsApp.


Photo and video sharing/storage apps with the problem of storing huge amounts of data + most of them includes the communication part too (comments). If I remember correctly WhatsApp doesn't even stores the text messages.

There's still a big difference between WhatsApp and the likes of Facebook when it comes to complexity. Last I checked, WhatsApp does not do face recognition, to pick an example at random.

I'll wager the complexity of WhatsApp is not 1% of 1% of Amazon.

> I don't think anyone commenting along these lines on HN is that ignorant.

You are quite the optimist.

It wasn't a great article from wired. I feel the language choice is probably the least contributing factor in terms of what's interesting at that scale. Yes, it's an eclectic choice, but I find systems/component architecture much more interesting than language and program architecture in scaling considerations.

A bit more info here: http://highscalability.com/blog/2014/3/31/how-whatsapp-grew-...

With regard to fun challenges to solve, from that article:

"Lots of problems related to scale as you might imagine. Problems with flapping connections, queues getting so long they delay high priority operations, flapping of timers, code that worked just fine at one traffic level breaking badly at higher traffic levels, high priority messages not getting serviced under high load, operations blocking other operations in unexpected ways, failures causing resources issues, and so on. These things just happen and have to be worked through no matter what system you are using."

I don't know I found the article decent _for_ being on wired. Didn't expect BEAM VM internals there...

> I feel the language choice is probably the least contributing factor in terms of what's interesting at that scale.

However, as they say "right from the horses' mouths", WhatsApp engineers have said that Erlang and FreeBSD are critical tools for their success. One can accuse them of lying, of course, but why?

Here is an interview with Eugene Fooksman:



...and the consensus in our team is that it is largely because of Erlang. We’re managing to serve huge amount of connections from single front-end server...


There is the "That A Billion With A 'B'" talk by Rick Reed at Erlang Factory (already posted somewhere) in here.

Here is another older directly from their website:


Clearly states Erlang and FreeBSD are important.

> These things just happen and have to be worked through no matter what system you are using.

Yeah but that is a bit too generalizing. It is like saying "well the language is Turing Complete" argument, yet it is but one tool is much better than another. Surely Twitter runs on JVM, Google doesn't use Erlang etc etc. So you can do it many other ways. And, at least in this case, they certainly picked the right tools, as we can see from their success. The number of users * amount of messages processed / # of engineers is a not a bad metric to see how good a tool is. And Erlang is a great tool here.

(Another example is when you use the smartphone to access the Internet, chances are 50% of the time that connection is set up by Erlang. It is there in the background doing its job, not crashing, setting up even an order of magnitude larger amount of data than we see from WhatsApp).

"One can accuse them of lying, of course, but why?"

I never said that.

I posted this on /r/programming earlier, and there was a fantastic response from /u/MyTribeCalledQuest.

It's here https://www.reddit.com/r/programming/comments/3l2spe/why_wha...

In its entirety:

I can explain a bit more in depth than the author did.

Erlang uses a model known as the actor model. This means that each part of your program is a completely independent entity like a mailbox, known as an actor. For one actor to communicate with another actor, it simply puts a message in the intended actor's mailbox. Since each actor is independent, this means that we can spawn as many actors as we want to read messages from a single mailbox, and do what is requested.

In terms of what WhatsApp is doing, this means that they can have (potentially infinite) conversations going on between users all at the same time. If any part of their pipeline is working too slowly (there are more messages being put in the mailbox than taken out) they can just spawn additional actors to read mail (at any time they want, even programmatically). Additionally, as alluded to by the author, in Erlang you can do something known as "hot loading," which means spawning newer versions of actors (when the implementation changes) while still running the old actors so that there is never any loss of service.

Haskell is similar to Erlang in its ability to scale. In fact, there is a library in Haskell known as HdpH-RS that enables fault-tolerant (the programmer does not have to worry about intermediate failure at all) distributed computing/memory (tested up to 1400 cores). The main reason for this is that Haskell is strictly-typed, meaning all types must be defined (or derivable) at compile time, and immutable, meaning that variables cannot change their values after they are defined.

Due to all of this strictness, you never have to worry about errors found in languages like C such as segfaults, or improper use of a function since you can enforce usage with types. For instance a function that should only accept unit vectors would use a type UnitVector instead of Vector (Note that this approach is generally a bad idea in C/C++/Java etc). Essentially, if your program compiles, then it will run correctly (generally the only real errors you run into are logical ones -- the algorithm itself being incorrect). This makes it really easy to refactor code later on. The reason Facebook can handle urgent tasks so quickly is mostly due to Haskell's generics, which are like templates from C++ or generics in Java. The main difference however is that Haskell lets you create generic mixins for types known as type classes. This means that you can write extremely general code to handle almost anything in the high level. Then, whenever you need to handle something new, you just have to choose which mixins you want and just add them to your type by defining the interface. For example, I could make a Multipliable type class, I would require the programmer to only define the multiplication operator for his type, and then it would automatically create things like pow or sqr.

That comment's description of Erlang is wrong.

In Erlang, message queues are tied to processes. You can't have multiple processes reading from the same mailbox without writing your own message broker process to implement a multi-reader mailbox.

>I feel the language choice is probably the least contributing factor in terms of what's interesting at that scale

Erlang and BEAM were designed for highly concurrent messaging applications. Surely that's of some importance.

I agree, Wired didn't cover the subject with the kind of detail programmers would expect.

>with the kind of detail programmers would expect.

Wired isn't writing articles for programmers. It's a pop-science magazine writing tech articles for the mainstream.

I think the point is more that WhatsApp continues to do one thing and to do it well. Conceptually this is simple -- although yes the scale adds plenty of complexity. Other social type services/apps/whatever try to become all things to all people they therefore become complex conceptually as well as due to scale.

Well, they do more than just "one thing" like text-messaging. They support voice chat, location sharing, group messaging, games (I read that the Threes game is a WhatsApp game in Eastern Asia) -- lots of features.

I like the "startup feel" that WhatsApp retained; hire few people that can solve immediate problems and roll out necessary features. This alone takes a great deal of work, but admittedly much more manageable because you don't have to deal with unnecessary features that could potentially hinder your customers experience.

Isn't the fact that they've actually done it with so few people fairly concrete evidence that it's not incredibly complex?

That's not evidence that's speculation.

They could be using really good tools. Or each of those 50 programmers are 10x more productive than regular programmer (I don't believe in this imo).

The evidence in this case is the fact that they built the company and product with 50 developers.

Whether that evidence implies anything about the product's complexity is the speculative part.

If the explanation is that every single programmer at WhatsApp is 10x more productive than programmers at similar top companies, then my first question is how did WhatsApp manage to hire such people but Google, Facebook, etc., did not?

Would you rather be one of 25,000 engineers at google, or one of 50 at whatsapp? A ton of people would chose the latter just to be in a more important core role. And if we use the acquisition price as a proxy for current market value, the per engineer capita is 20 times better at WhatsApp. I don't have any inside info, but I'm betting any of those engineers that had options are very very happy with their current job.

That's very handwavy and not rigorous.

> A ton of people would chose the latter just to be in a more important core role.

Yeah, and a ton of people would choose the former just to be in a bigger company with more perks or because they want to work on something other than an IM app.

Who knows? This isn't nearly strong enough to form a conclusion either way.

> the per engineer capita is 20 times better at WhatsApp

Perhaps, but why? You can't say that they got better talent just because they were a startup, because then I can point out all the other startups that don't have such talent.

> I'm betting any of those engineers that had options are very very happy with their current job.

I'm sure they are. I'm also sure they're not oracles who can predict the future. So they couldn't have known when joining that WhatsApp would be acquired for such a spectacular amount. So why WhatsApp over all the other startups? What did WhatsApp do to attract such world-class talent? I'm looking for a real, concrete answer that couldn't equally be applied to every other startup out there.

The alternative explanation, of course, is that WhatsApp just isn't as complex as some here are proposing it to be. Then we don't have the mystery of how they beat every other company in the world at hiring the greatest unknown talent. Rather, they simply timed the market perfectly, probably partially through luck.

In fairness, a lot of us have built systems that are just as complex, if not more. This is par for the course these days. The article seems to imply that they're doing something special, and that Erlang has something to do with it. It's no surprise to me that people are skeptical of such claims.

If this isn't a counter to the inane recruiting requirements of "5 years with language X" I don't know what is:

We don’t bring them in specifically because the engineer knows Erlang,” Mahdavi said on Monday. “We expect the engineer to come in and spend their first week getting familiar with the language and learning to use the environment. If you hire smart people, they’ll be able to do that.”

And yet on their Server Software Developer ad [0] they have:

" Experience: - 2+ Years of Erlang Programming"

[0]: https://www.whatsapp.com/join/?dept=software-engineering&id=...

This reminds me of how we have been hiring engineers.

We sit them down for a day with a fairly simple task (build a simple web or mobile app, about three screens with a basic data model) but we make sure to give them a language or framework they are unfamiliar with.

They have Google, Stack Overflow, and other employees to use as a resource. It's a great way to get to know new hires while seeing how resourceful and interested in learning they are.

Every candidate has built the app to spec with a few hours remaining, but it's really good to see those who take the initiative to spend a bit of extra time polishing it and explaining it to us, and responding to our feedback.

Does this interviewing methodology mean that you only hire devs that don't currently have a gig or have vacation days to blow on the possibility of getting a job with you?

We do have an initial hour meeting with candidates just to get to know them and propose the trial if they seem like a possibility.

Wouldn't most people take a day off to interview somewhere? I know I wouldn't be comfortable ducking out for a few hours to interview — it would feel tense and uncomfortable.

Facebook, and I'm sure many other places, do full-day interviews. It's certainly not unusual.

> Wouldn't most people take a day off to interview somewhere?

Not always possible. One of the big annoyances when I was working for a company was that if I wanted time off it was two weeks notice. Doesn't work particularly well when the interview invitation tends to be more along the lines of, 'Hi, your interview date is next week.'

Or maybe you have had many life events (births, deaths, etc.) and your employer wasn't very understanding. So you've already burned all your time off and are ready to find an employer who's a better fit.

Sick days?

I guess I'm not really thinking this is a hardship on the interviewee, but wondering more if you're implicitly filtering your candidate pool. But you make good points.

My thinking is when you require a day of someone, or anything above 2 hours, you pay them. That is whether or not you hire them.

and do you pay them my day rate is £500 :-)

Actually, I think this is a fair way to evaluate new hires. That said, I hope you don't look over their shoulders? I can't tie my shoe laces with someone looking over my shoulders. Or, secretly view their progress? I'm o.k. With reviewing their progress at the end of the day though?

Plus, if you are going to hire in this fashion, why even bother with resumes, or extensive resumes? Just bring people in for a test? If they do well--hire them?

I always felt a test is the fairest way to hire new employees. Tests do away with upperclass privilege(better contacts, padded resumes, etc.) I wish more companies vetted employees in this fashion. It might get rid of something I have always dreaded, and get slightly nauseous when I see the behavior in action--and that is Networking. Sorry, I always thought it was phoney.

I still imagine your company relies heavily on resumes, and uses the test--because they can? Meaning--there's still a lot of desperate software engineers out there; willing to do anything to land a job?

This is one of the most interesting interview ideas I've read in a while. I'm sure a lot of people would love a writeup of your experiences with it.

And your employees are cool with being bugged day in and day out by potential hires? I am skeptical this could work for anything but a small shop.

I have been looking for full time openings at the moment and I prefer this kind of hiring practice but it's been rare.

Can you share where you work? :)

I'm surprised that nobody mentioned why whatsapp started with Erlang in the first place. They started out with an open source xmpp package. The most popular one at the time happened to be written in Erlang (ejabberd). There was no masterplan to scale to close to a billion accounts.

As it happens, Erlang is an excellent platform upon which to build a message exchange service. Also, the article doesn't mention their completely non-traditional approach to ops. Despite the conventional wisdom in the valley, they run their own servers. And squeeze an enormous amount of value from a small number of servers. Their unique ops strategy is probably as much a part of their success as simply using Erlang.


I don't quite understand the correlation. If the article was about how Whatsapp achieves scale and parallelism through functional languages, then fair enough. But I'm not sure it's fair to say they need 50 engineers, in part, because of the language choice ? Surely they need 50 engineers because their product is fairly simple and there's no need to have more engineers than features. Maybe the point it should have made is that Whatsapp values higher quality over quantity ? That I could relate to.

Well, isn't the language a hood enough reason?

I think most seasoned game developers would be faster making a simple 3D game with Unity rather than just openGL + C ( mainly because with Unity you get soon much boilerplate-y stuff out of the box)

The language and the amazing properties of failure tolerance could be productivity multipliers ( think of the times you've had to deal with catastrophic failures of software)

Nah, language alone isn't a good enough reason. It can contribute, just like every choice of tool can contribute.

You example, unity, isn't a language, but instead an off the shelf engine and toolchain.

But just like the development on an individual game seem less impressive technologically the more they rely on existing tech [1], admitting "Yeah, we forked ejabberd and rigidly fight scope creep" doesn't have the same ring as hyping up features in the runtime of a hip yet obscure programming language.

[1] Fun side note: If you watch the games press interviews devs, pay attention to when they ask about what engine they use. The press don't and viewers often don't know anything about software projects, so the devs are reluctant to to admit how much they've relied on off the self components for their admittedly-huge undertaking. Fun to watch the paid hype men try to talk around that.

Actually I believe that answer is in the article: “Our strategy around recruiting is to find the best and brightest engineers. We don’t bring them in specifically because the engineer knows Erlang,”

WhatsApp only needs 50 engineers because of who they hire. Even using Erlang, I pretty sure they would need more than 50 engineers if they hired mainly around average engineers.

How do you know if an engineer is average vs one of the best?

I haven't heard of anyone who has figured out how to measure an engineer's abilities.

Some people test algorithms. Others test how often they've shipped things. Most just look for years of experience. A few even test whether you know certain facts.


I haven't heard of a single company that has nailed down interviews. I was going to mention interviews but figured that if you couldn't measure how much an employee contributes, you'd have a much harder time measuring how much a prospective employee could contribute given a much shorter time to test them.

"...to find the best and brightest engineers."

Who doesn't say that though? No company says they hire average engineers.

But I agree that their success does kind of prove that they succeeded in that.

> Surely they need 50 engineers because their product is fairly simple and there's no need to have more engineers than features.

Right. There's not even a way to adjust notification levels based on person or group. I ended up turning off notifications for the whole app, so it stopped serving the same use cases that text messages do. People still need to text or call me if they need an urgent answer.

On the Android app there is. Choose the "View Contact" or "View Group" menu option from the top right and then change that contact or group's notification settings.

Ah, right. Thanks. Still, if there were 60 developers, could they have this feature on all clients.

That was just an example anyway. I could easily have pointed to the ambiguous end-to-end encryption (are my messages even being encrypted?) or the lack of encryption in group chats.

You can mute an individual chat for up to a year.

If you take a simple task and scale it by six or seven orders of magnitude, the result is anything but simple.

Isn't it more because they're a simple IM application (albeit spread across a number of platforms)? I know they're hugely successful and there are considerations about scaling to that sort of size, but surely the fact that their product is extremely simple has to be a huge factor?

(Disclaimer: I teach this stuff) Good article. It's a keeper. Touches on a lot of things I've been telling clients for years.

My takeaways:

- Pure functions in little composable pieces. Screw the fact you can't find programmers. With 1/20th the staff, it's not important

- Zero to few meetings. Keep focused on one thing. No playing around with WhizzBang Platform 7.0 because all the cool kids are using it. Mind your knitting.

- Keep It Simple, Stupid. Engineers are our own worst enemy. Solve the most simple problem possible. Then add complexity a little bit at a time, only as a last resort. For those of you saying "But messaging is solved", "Erlang was written for messaging", and so forth, this is where you missed. Any complex system (with a few notable exceptions) will look very simple when solved in this manner. In fact, that's the entire point.

- Running and deploying are the same thing. CI/CD. There is no Big Red Button to push because we're always working on the airplane engines while the plane is flying

Coming from a traditional OOA/D/P background, this mentality was extremely foreign to me. Even though I was using and talking about TDD, it was still in terms of composing and re-arranging object graphs. It wasn't until I got into F# several years ago that the pieces started coming together. This is a very difficult conceptual leap to make, because a lot of the ways you work looks completely ass-backwards to folks who are used to doing it the other way.

Could you elaborate what is is that F# taught you, and how it changed the way you work?

I realize you're using a throwaway account, but this is really more like an essay, not a HN comment (cue up snarky observations about the length of my comments). There were four or five things that all came together at the same time for me: lean startup, functional programming, TDD, and static page web programming.

If you're interested, my contact details are in my profile. Happy to have a call/Skype. It's an important topic.

maybe a blog post and post it on hn?

Here's part of what I don't get - there are so many government organizations, state and federal, jumping over themselves to provide funding, incubation and support to IT product/app companies across the country claiming it creates jobs when, as this shows, it is entirely possible to operate at incredible scale nowadays with a mere skeleton staff. So why do so many government-run and government-funded programs fawn over such companies when their ultimate goal is job creation and these companies are designed to run with barely a couple dozen people at most?

This has nothing to do with private VC's; I completely understand why they are in the game. I'm talking about government programs or government-funded NGO programs that provide tax incentives and other funding or support to startups in the product/app space hoping it will create jobs. Maybe this isn't every state, but where I live this is the case.

I guess they hope for startups that eventually will be tech giants like Apple and IBM, that actually do create jobs. It's only a fairly recent development that it's becoming evident that technology allows for a tremendous centralization and automation. Algorithms are invented by one person, implemented by ten and used by billions. Eventually, only a tiny elite will need to work, and at that point we will need some sort of basic income.

I totally agree with the idea of a basic guaranteed income, but who's going to do the grunt work? When are robots going to replace all jobs?

Grunt work gets more expensive when people aren't desperate for work, and that seems fair.

Because most of those politicians think Google employs roughly the same number of people that GM used to. Google has about 55k employees [0] and GM at it's peak had about 350k employees [1], a 6 fold difference. GM also had high competition in the marketplace with Ford and others, so the number of autoworkers was likely in the millions for the country. Since the car and the computer are synonymous for 'mental space' for most people, meaning they are about equally used in terms of time and resources, the 2 industries are considered roughly equal. Granted, there are a lot more tech companies out there than auto companies even in the 80's heyday, so the number of workers may be near parity.

Also, remember that Google and FB have put a lot of cash in to D.C. in terms of lobbying [2]. FB is essentially using the start-up scene as their R&D departments, occasionally having to fork out the moolah to buy WhatsAps and other viable competitors.

[0] https://www.quora.com/How-many-employees-does-Google-have



GM manufactures their cars in their own factories. Electronics is largely made by fab foundries and electronics assemblers like Foxconn. The entirety of a Chevy Cruze is assembled by GM from parts sourced from other companies and GM itself. Apple iPhones are assembled by Foxconn and others. Foxconn is supposed to employ 300,000 people to assemble iPhone 5S in 2013 [1].

[1] http://fortune.com/2013/11/27/by-the-numbers-how-foxconn-chu...

Do people really equate Google and GM because of the amount of 'mental space' they take? I would imagine people look at market cap or revenue or pretax earnings etc.

My view is that government should stick to 'government' things like providing infrastructure, education, health care, and stuff like that. If there's money left over, lower taxes some, or even better, get rid of annoying fees and streamline things.

Part of this "streamline things" includes lots of IT infrastructure, though.

You can’t get electronic tax filing without technology, you can’t get full open data availability with nice diagrams like https://www.destatis.de/bevoelkerungspyramide/ without lots of IT workers in the government (this is available for every data collected by the German Federal Statistics Agency, btw), and you can’t get stuff like http://ims.kiel.de/extern/kielmaps/ which show even lanes and zoning for cities without people working on it.

Part of the job of governments is also always having reliable, high quality data about their country, for government purposes. But it also means they need to publish those for citizen, and they need people taking care of that.

Those are all things with very wide benefits, rather than incubators, where you get someone in the government trying to pick a company to give money to. So to me all those things still sound like 'infrastructure' that private companies probably would underprovision.

Effectively, the whole reason why governments exist to do things is because they can do things that are unprofitable. And they can do it well. Look at the US healthcare system vs. the social democracies. You have the same cost per person in taxes (the US actually spends more tax dollars per person on the healthcare system than most other countries), but the US has, additionally, people paying private on top of that, and you get worse results.

I have a suspicion that 'job creation' is just the new codeword for trickledown economics.

So why do so many government-run and government-funded programs fawn over such companies when their ultimate goal is job creation and these companies are designed to run with barely a couple dozen people at most?

The people rich enough for congress' ear says the jobs are hard to fill. What the employers mean is that they're expensive. What the government hears is high demand. Government will champion tech work until labor costs are driven down.

For startups where technology is not the only infrastructure of the platform your observation is likely not true.

Look at startups like Cloudfactory: http://www.cloudfactory.com/home (they are actually on a mission to create jobs for millions)

Why are you picking on the government :)?

There are many funded startups and publicly traded companies that are doing the same thing.

Because private sector investors have an interest in making a return on investment, which product companies do in spades, but government has an interest in creating jobs, which these product/app startups don't typically do well at all. So why should government pick the same types of "investments" as Silicon Valley VC's when their criteria and end goals are so completely different?

For reference here is a talk they did about how they scaled WhatsApp and the problems they faced:


I got my first ever spam on whatsapp the other day from someone who had never been a contact, and there seems to be no way whatsoever to prevent it. So maybe they should hire 1 more engineer to work on spam.

I installed whatsapp and the first three messages I received were spam, all within about 30 minutes. I uninstalled whatsapp.

I've used it for at least 4 years, only got one spam message ever. I blocked the sender. I didn't uninstall whatsapp.

I just recently started using WhatsApp for some international travel and to communicate with friends abroad and haven't received any spam for several months. I've also found it to be far superior than regular SMS, especially in group settings with people using different operating systems and would probably keep using it had I received the occasional spam (as I do with many other services, Skype, E-Mail, etc...)

What version of Whatsapp/Platform are you using - newer versions of Whatsapp have spam blocking features.


That only works with direct messages. Spammers have upped their ante, and they are now sending spam by adding you to group messages which (when I looked it up) don't allow you to report them as spammer (you can still block them, but that doesn't prevent a spam epidemy)

Exactly how I was spammed, and I echo someone else's comments that I can't believe you can't activate a whitelist.

Adding more privacy controls would sort of kill the point of it as SMS killer. You can block specific people.

What they should control is the APIs that are popping up like promotional SMS with support for Whatsapp. These companies are obviously circumventing their endpoints.

I have to disagree.

Whitelisting should always be an option - it's simple to achieve technically and allows the consumer to have complete control.

Edit: And the fact there is no whitelisting is also the reason I removed the app from my phone.

How long have you been using whatsapp? Because only one spam message sounds like it's not a huge problem...

> Why WhatsApp Only Needs 50 Engineers for Its 900M Users

Answer: because sending short messages from A to B is basically a solved problem. There is even a programming language (Erlang) that was made with this application in mind. The prototypical "Hello World" example for Erlang is a messaging application.

I'm sure you could do it in an afternoon, right? Just like anyone on HN can make a "basic CRUD app" like Facebook in a weekend.

I really dislike the arrogant attitude behind these types of comments. Have you worked at WhatsApp? Do you have any idea what they spend their days doing, what their systems look like, what their requirements are like?

WhatsApp have close to a billion users, 50 engineers and they manage to produce a near flawless experience. This is not trivial, no matter how many armchair critics claim otherwise. It used to be the case that people dismissed FB as just another CRUD app ("not even written in RoR, but in PHP, yuck" ~ 2005-2010), but given the tools they have been pushing the last few years people seem to have stopped dismissing them as casually. Perhaps in a few years people will stop dismissing WhatsApp as casually as well.

I believe that the line of reasoning of your parent still has merit. Erlang OTP was developed for telephony systems and has proven to be very reliable for distributed system. Messaging maps relatively nicely to Erlang OTP and as such Whatsapp are leveraging decades of research and work by Ericsson. Of course, this is how it should be: a good software infrastructure should save users time.

Obviously, creating Whatsapp is nothing near a weekend project. But I think there founders should be commended especially for avoiding some classic mistakes: the NIH syndrome and going on a hiring spree once the investments started rolling in. Their managerial skills are at least as good as their engineering skills.

I think that indeed the important thing here. The article try to focus a bit too much on some intrinsic qualities of the language as if it was the silver bullet of scalability while the real lesson is that they used the right tool for the job.

Not so long ago, maintaining hardware that could support 900M user would have required an IBM scale company. A single developer today can develop, deploy and maintain a medium scale ecommerce site using infrastructure like AWS, a myriad of OpenSource solutions, plenty of services to handle payments, ... yet he will probably be using the same language than 15 years ago when 20 times more developers were needed to achieve the same result.

From the article:

* SoftLayer is their cloud provider, bare metal machines, fairly isolated within the network, dual datacenter configuration

Softlayer is an IBM Company, so ultimately it DOES require an IBM scale company to run this ( at some point in the chain).

Indeed. It's amazing :) . All the infrastructure-as-a-service stuff REALLY cuts down the overhead.

I'm building a product that only a few years ago would have required a VERY significant investment, but now is basically stacking and connecting lego blocks of services :) - sales-as-a-service isn't mature yet, but if we had it, it would even sell itself :) .

Ok, it's probably a pain if one of the black boxes fails, and I do know enough about the underlying architecture behind the services I'm using - I could probably replicate (badly) most if not all of them given time and money, but why would I?

> Ok, it's probably a pain if one of the black boxes fails, and I do know enough about the underlying architecture behind the services I'm using - I could probably replicate (badly) most if not all of them given time and money, but why would I?

I don't think this is a possibility whose importance can be understated. In most of my apps running on IaaS/PaaS offerings like heroku, key pieces of the infrastructure tend to fail for short times (typically very inconvenient times) fairly frequently, on the order of once or twice a week. The relative cost of this is highly variable and business-dependent, but at best its mildly inconvenient and at worst can be crippling. Its definitely something that needs to be accounted for. That said, I've also been lead on apps that used the same pieces of server infrastructure that had far better uptime when I handle ops myself instead of delegating that to another provider. (Not to pick on the providers—they have a very difficult job to do in a cost-effective way, and I'm quite certain that they do it better at that scale than I would.)

The choice of Erlang for WhatsApp was strategic if for no other reason that that it allows them to dispense with some of those choices. Many of the typical use-cases of Redis, for example, are easily supported by OTP.

I'm not sure how you managed to translate "Its not surprising 50 engineers are enough" to "I could do it in an afternoon"

Essentially, yes? I mean, are you suggesting these engineers are doing magic? That they wrote some new and amazing code that anyone could not write? That these 50 people are the only ones who could do this and somehow ended up at WhatsApp? Or are they just leveraging powerful systems efficiently?

Have you worked at WhatsApp? Do you have any idea what they spend their days doing, what their systems look like, what their requirements are like?

Do you? If yes, please enlighten us. Otherwise I don't see the point of your objection. No one said that it can be done in a weekend. All that the parent comment said is that the fundamentals of building WhatsApp are already solved. He/she didn't dismiss it. Just because something isn't rocket science doesn't mean it's not useful.

As for Facebook, people used to dismiss it not because it was seemingly too easy to build but because they failed to see its usage. Long before it became a platform it was pretty much a waste of time. Obviously anything with more than a hundred MM users is difficult to maintain.

Not "parent" but search for Erlang Factory talks they talk about it. Here is one from Rick Reed. He explains how the product works :


I can personally guarantee to you from direct current experience that there is nothing particularly solved about running services for even 50 million users.

Go watch this: https://www.youtube.com/watch?v=TneLO5TdW_M#

Hang on, I _could_ write a (small) twitter or (early) fb clone in a weekend. Easily. That would probably scale to 10k tweets or feed entries.

What I in _no_ way could do is rewrite fb or twitter at the scale these systems operate today with a billion users and even more posts and data points. I don't agree with the sentiment of the previous poster, but fb & twitter were initially basic CRUD apps.

I have to disagree. They were messaging brokers masquerading as or mistaken for CRUD apps, which directly led to many of their early scaling issues.

But you can just implement them(the early versions) on any old server with a nice database installed if you want to. And you can do that in a weekend.

And yes of course you will want to take a step back and change almost everything about it if you want it to scale to more orders of magnitude.

This might be me being exceedingly charitable to the OP, but I see his point differently:

There's a ton of work involved in making a platform like WhatsApp a polished user experience. There's then a ton more work involved in making it _solid_. In choosing Erlang, they chose a platform that trivialises a large part (though not all) of the latter, allowing them to focus on the former.

I think the reality, as is often the case with two extremes, is somewhere in between.

Is this a simple 'solved' problem that anyone could do? No. But is it a super-human feet that only a handful of people could achieve? IMO, no as well. I think people in the latter extreme like to believe this as it's something they can aspire to - to say otherwise is to devalue their vocation. In the former camp, I think it's people pushing back against this too far in the opposite direction.

>I'm sure you could do it in an afternoon, right? Just like anyone on HN can make a "basic CRUD app" like Facebook in a weekend.

Maybe the backend. I couldn't write a Blackberry Java app though which was WhatsApp's initial value proposition.

Well, frankly, there are plenty of open source chat server implementations (usually following XMPP standards) which easily scale to 10's of thousands, sometimes 100's of thousands of users without any modifications (OpenFire, to name one). It wouldn't be that difficult for a group/team of people to scale that into a cluster of servers and support several hundred million users at once -- XMPP packets are small and this problem has been solved many times.

From a technical standpoint, WhatsApp, the product, and the scale they operate at are nothing new.

Interesting! When did a XMPP server run with hundreds of thousands of users? At gmail?

Google Messenger, Facebook Messenger, MSN Messenger, AOL Messenger (AIM), etc...

(note that both google and facebook use proprietary chat protocols now i believe)

I second you. People throw in things like "Duh, it's a lame technology, duh, I am working on something far superior, duh, that 3 people will ever use, duh"

Don't forget WhatsApp has applications on all platforms.

Well said.

Sure, the initial business case is "Send a message from A to B". But it's not hard to think of more things to do:

- What if A has a Nokia and B has an iPhone?

- What if you want A, B, and C to have a chatroom?

- What if someone starts spamming random people?

- How do we QA the thing for all these platforms?

- How about someone to keep the visual design fresh?

- What about a million corner cases like when someone is not online, someone sends a message that's too big, one of the servers goes down, and so on?


You're right that the scope is not as big as some other apps, and that's what makes 50 a sensible number rather than 5000.

Pretty much every single one of your test cases has already been solved in the XMPP specification, which WhatsApp is likely using (essentially all modern chat services/servers/clients speak XMPP).

Sure. And someone's got to take the XMPP package and put it on the different platforms, test them all for correctness, etc. I'm not saying there aren't existing parts that can be used. But even if you have a plausible component, someone's got to look at the docs, maybe build a toy version, think about whether you're hitting the limits, integrate with the rest of the codebase, and so on.

It's easy to see what pieces you need. But there's still work in glueing them together and testing the result.

I think 50 is a sensible number of in-house engineers for this sort of thing. You want cover as well in case someone leaves or gets ill. You want people to be able to upgrade the system when things change. You want people to look ahead at future requirements. And you want to be able to do these things all at once, with slack built in for peak load.

Well, you sort of are making my point -- 50 engineers is plenty (maybe even too many) to cobble together a solution to a problem that already has been solved and solved again.

WhatsApp did nothing technically challenging, but they did strap a business model (err, sort of) to something many others failed to capitalize on.

Yep. And of course, Erlang is really only a functional language in the small, the parts that don't matter so much. In the large, arguably the scale that matters, it's an actor language, with highly encapsulated entities exchanging messages. So essentially what Alan Kay had in mind when he coined the term "object oriented".


Indeed, Joe Armstrong once said that he believes Erlang to be the only OO language according to Alan Kay's idea [1].

Also, let's not forget to give credit to Carl Hewitt who came up with actors in the first place [2].

[1] http://www.infoq.com/interviews/johnson-armstrong-oop

[2] https://www.youtube.com/watch?v=7erJ1DV_Tlo

Upvoted for correctly invoking Alan Kay's vision of object oriented. :)

This comment focuses on the back-end. As important as it is, as far as I remember when FB acquired WhatsApp then one of the main advantages was the presence of clients in almost any mobile device (thanks to J2ME). I am pretty sure it is not trivial to maintain so many clients, even though over time the older clients will disappear and it will be mostly Android / IPhone / Windows (??) that the engineers need to maintain.

The only thing simpler would be sending messages to a centralized queue for people to fetch. Yet Twitter needs 4100 employees for that (though not all engineers I hope).

Centralized queue and global fan-out makes it only harder to do at scale, not easier. With 1-to-1 messaging, it's trivial to shard the whole system.


Twitter is not 1-to-1 messaging, generally.

Loads of recognition for erlang, but not a single word about ejabberd in the article...

Talking about Erlang has the cred of an esoteric language. And you can hype up your company for using it, the allure of different languages seems to be in fashion right now (the article goes on tangents about Facebook/Haskell, Mozilla/Rust and Google/Go).

Talking about ejabberd is admitting a core piece of the product is standing on the solders of giants. Something startups are often loathe to do.

I bet that WhatsUp infrastructure would work ~ 35 engineers.

That's a social problem though (the fact that 35 guys generate so much cash, while on the other side of the planet 350 millions are looking for a way to pay the rent), not a technical one :-)

Actually, over lossy links, it's well known to be an impossible problem:


I don't see how that's an issue here. The recipient doesn't need to know if his message receipt has been received. The burden remains with the sender to retry, just like TCP. The real Two Generals' Problem in instant messaging can just be passed to the communicating humans to deal with.

You are right. But on that level, even breathing is an impossible problem, because the air molecules could statistically bounce out of the room.

A whatsapp conversation is not dependent on the parties coming to a consensus on the timing for a common event.

Also, an army can only send so many messengers before you run out of soldiers (or operational readiness). Packets are free and plentiful. If you're on a network link so bad that you can't even occasionally receive a TCP ack, then you're very much an outlier.

By that logic CouchDB would have been a big success and wouldn't have suffered from scalability problems

Also make sure to support offline devices being sent text, audio, video and image files (and the client application on several platforms)

"WhatsApp doesn’t talk much about its engineering work" - Wrong as hell. They first talked about this in erlang conf about 3 yrs ago, in 2012. [Youtube Link]( https://www.youtube.com/watch?v=wDk6l3tPBuw ).

I hate how tech blogs take a thing thats quite well known and old and spins into a "did you know?" post like it was just unraveled (Oh, maybe your staff just heard about it, doesnt mean no one knows shit.)

Reading through comments, I think there is an undercurrent of slight envy or resentment (perhaps unconscious) both towards WhatsApp and Erlang. We are rational people so we'll never admit to that, so it comes out in other objections "It is a simple system", "I could do the backend in a weekend"...

There are a lot of startup people here, who work at a startup, bet their time, money, life? on one, and talking about a successful lean startup sold for 19B probably bring feelings of "How come it is not my startup?".

And then for Erlang, it has different syntax, and have to think about concurrency, functional programming, and it is hard for someone used to curly braces. Maybe many tried it, but dismissed it, or bet (time, money, life?) one something else so it is easy to say "But it is not about the platform or technology". Because other conclusions might mean "heck, maybe I made a mistake, I should have that up as well for my problem domain", nobody like to feel that way. Of course, nevermind that engineers from WhatApp have mentioned Erlang was one of their strategic advantages.

Managing 2-3M connections per machine means needing to have fault tolerance (so Erlang is a good choice), but also means managing an order of magnitude less machines! One of the deeper insights we can learn in general is that at scale no matter how cool the concurrency mechanisms, how fast, and new, if they don't go hand in hand with fault isolation then it will just be a very fast system until it starts crashing and its throughput drops to 0. Of course you can do fault isolation with separate servers and OS processes (containers,VMs...) but in this case they do it at a finer grained level.

They surely excel at picking the right tool for the right job.

One aspect of this trend of resentment you describe is that having comparatively less robust and using less efficient languages (like js with nodejs) in the servers would make them require more cloud resources.

We as humans tend to rationalize our past choices, probably a fair amount of the dismissal is from developers who think their "secret sauce" is using AWS with auto-scaling.

And the only one who wins something from this trend is Jeff Bezos and other cloud shareholders.

I resent them because Whatsapp is terrible, terrible software compared to Facebook Messenger yet somehow made $19B.

1. No web interface, I'm forced to use a tiny mobile keyboard

2. Identity tied to my phone number which changes every month

3. Ugly (subjective)

4. My friends are already on Facebook, why have another service that does the same thing but worse.

5. No chat bubbles.

6. No meme search

I could go on and on. They just got lucky and hit the lotto with foreigners who couldn't afford decent phones and are now locked in to their platform.

Edit: formatting

> 1. No web interface, I'm forced to use a tiny mobile keyboard

Not a problem for most people. On the other hand it works well on pretty much every phone out there. In comparison Facebook messenger runs terribly on my iPhone 4. I'd hate to try and use it on a lower end android phone.

> 2. Identity tied to my phone number which changes every month

I've had the same phone number for over 10 years. Everybody understands and is familiar with phone numbers and have been for a long time. My 70 year old mother has no problems using whatsapp. Many more people have my phone number than have my email address.

> 4. My friends are already on Facebook

Good for you. Many of my friends aren't. Most of my family and relatives aren't. I'm thinking of leaving it myself as it's just a big time waster.

> I resent them because Whatsapp is terrible, terrible software compared to Facebook Messenger yet somehow made $19B.

Except it's really only bad for your particular use case. For most people Facebook messenger was late to the party and doesn't have any real draw.

Facebook messenger still doesn't have basic functionality I want. For example if I scroll to a particular point in a chat conversation and later come back to the conversation FB Messenger has not kept my scroll position. Basic basic usability problems.

> For most people Facebook messenger was late to the party and doesn't have any real draw.

Facebook Messenger has been around since the launch of Facebook. I've personally been using it over 7 years in various forms. WhatsApp is the one that was late to the party.

> On the other hand it works well on pretty much every phone out there.

Of course it does, because it has no features. You can't send money with it, you can't send stickers or GIFs, you have to physically open the app to send a message, it doesn't have link previews, and so on and so forth.

> Facebook Messenger has been around since the launch of Facebook. I've personally been using it over 7 years in various forms.

And it was a crap experience on mobile until it was pulled out of Facebook into its own app.

> Of course it does, because it has no features.

It has the most important features for good individual and group chat.

> you can't send stickers or GIFs

That's a feature.

> you have to physically open the app to send a message

I'm not sure what that means. I have to open the FB Messenger app too? Maybe it's different on android.

> it doesn't have link previews

Again another point in whatsapps favor. I hate link previews in FB Messenger.

> You can't send money with it

Not really much of a feature because of all the setup involved. It's got potential and if it could tie in with the host operating system or payment providers etc on mobile it could be really great.

Number 4 means you don't have to use the service at all, and no one is forcing you.

The only reason I use Whatsapp is for contacts that don't have Skype (even your fancy Facebook is too new and webby for me).

Video calls are a must for me, but they seem to be a thing of the past now.

Of course nobody is forcing me, it just boggles my mind that they have any market share at all. It feels like watching a six year old randomly throw paint at a canvas and selling it at auction for $50 million.

What boggles my mind is that MS could have it all but simply neglected Messenger until it died.

WhatsApp success is built more on MS failure than anything else.

> 1. No web interface, I'm forced to use a tiny mobile keyboard

No idea how recent this is, I discovered it a couple of weeks ago: https://web.whatsapp.com/

Why does your phone number change every month?

Because I travel a lot and use local SIM cards.

Whilst abroad, I've used foreign sim cards in my phone and all Whatsapp does is prompt to keep the existing number or change to new number.

But how do you tell people to add you on WhatsApp? I don't even know my phone number. Phone numbers are a poor replacement for email addresses or usernames.

Edit: not to mention the security implications of having authentication tied to one's phone number. Any telecom employee, foreign government agent, or skilled social engineer can impersonate one on WhatsApp reasonably easily.

I'd say one talk at an erlang conference three years ago falls into the umbrella of not talking much. The article doesn't say "they never talk about engineering."

It is an hour talk and it specifically mentions how Erlang was used and how it gave them a strategic advantage.

I have found other mentions about it, perhaps on Erlang mail lists, here is an interview with Eugene Fooksman:



And the consensus in our team is that it is largely because of Erlang. We’re managing to serve huge amount of connections from single front-end server (this is from last year’s Erlang


I don't know how much clearer can it get.

Here is another directly from their website:


It is a bit older they clearly indicate that FreeBSD and Erlang are key and critical elements that let them operate they way they do.

Worth reading, especially the stuff that is linked:


This was a much better article. I submitted it to HN: https://news.ycombinator.com/item?id=10226317

Perhaps the mods could merge/replace this (pretty bad) Wired article?

Yup, Erlang. If I move on from Python as my main programming language of choice, it would be to Erlang. So many are enthralled by Go and I never saw it. The Google association helps for those that idolize the corporation. Others feel Java is all we need or C# is all we need. Or JS and C++ and call it done. Some want to JS all the things. Erlang is a bit niche but it's indispensable like C, and Python is just such a great gen purpose platform. The most value is in the C/Python/Erlang triforce.

WhatsApp seems to be a great example of designing your system with the best tools available. To go from nothing to pretty much being the de-facto modern replacement for SMS in a couple of years is an amazing achievement.

I really need to sit down and spend some time properly learning a functional language. I can hack my way through Haskell code but I do it in a very non-Haskell way. I really need to change that. My primary language is C++ and I am open to any recommendations for what direction to go in :)

For Erlang, there is the book by Joe Armstrong:


The problem with learning functional languages is finding pragmatic learning materials.

I would claim F# is currently the most approachable functional language (just my opinion but I have at least toyed with the other mainstream offerings).

My background is also in C++. The F# materials listed helped me personally to develop as a programmer and have made approaching other languages like Erlang easier.

Sestoft's programming language concepts: https://www.itu.dk/~sestoft/plc/

Expert F# 3.0 contains lots of short snippets and examples: http://www.apress.com/9781430246503

Flying frog consultancys materials are steep in price but I found them worth my dime (Visual F# 2010 for Technical Computing and the materials in The F# Journal) http://www.ffconsultancy.com/products/index.html

> The problem with learning functional languages is finding pragmatic learning materials.

This is kind of true. But there is a nice community around erlang. I always found good, valueable input at erlangcentral.org and stackoverflow.

I'll also throw Elixir out there for being a much more approachable way into functional languages(and it runs on the Erlang VM to boot).

Also try learnyousomeerlang.com

Try Elixir, it runs on the ErlangVM and has a much nicer syntax, plus metaprogramming through Lisp-style macros, while preserving every feature that makes erlang great.

https://pragprog.com/book/elixir/programming-elixir <-- dave thomas has a great writing style.

Or LFE - Lisp Flavored Erlang - if you prefer Lisp to Rubyesque syntax. Robert Virding, one of the gang along with Joe Armstrong that created Erlang, created LFE.

I have a list of free Erlang resources: https://gist.github.com/macintux/6349828

Because adding more engineers will make the development slower (https://en.wikipedia.org/wiki/The_Mythical_Man-Month).

WhatsApp is a service in production, not a project behind deadline.

Yes, but the reason more people create overhead in a late project are the same why they create overhead in an organization.

There are more than 50 engineers working to support WhatsApp. A complete count should include all of the work that was out-sourced, such as engineers at AWS (or whomever is supplying the computing), the engineers for Erlang, etc. If the government builds a bridge by using a construction company, no one says the government is capable of building a bridge with zero engineers.

The app is still a remarkable achievement. Those engineers have done a remarkable job integrating everything (plus their own business logic on top), but they are also leveraging a great deal of work done by others.

> If the government builds a bridge by using a construction company, no one says the government is capable of building a bridge with zero engineers.

However I doubt people pay much attention to the companies quarrying rock to make concrete, or the engineers designing the axles of the trucks. Any large project is a team effort, but to count tangentially related projects as partitions of another ignores the achievements of those projects (i.e. AWS and Erlang are massive achievements that have, and will, exist regardless of WhatsApp).

So, WhatsApp has 50 engineers modulo any dedicated support staff.

> A complete count should include all of the work that was out-sourced

No, it shouldn't. A complete account should just be people employed by the company.

On a side note, there is a Chinese Internet messaging software called QQ developed by Tencent (which later developed WeChat). it had hundreds of millions of users about 8 years ago, and it runs on multiple platforms, including Nokia, Android, etc.

So the point is that it is not surprising for a similar app to be developed 5 years later by a small group of people.


They didn't cover that they use FreeBSD and are handling 2 million tcp connections per server which is not a trivial task

There is a brief mention of FreeBSD in the article, but more would have been nice.

"Code in Parallel In using Erlang, WhatsApp is part of a larger push towards programming languages that are designed for concurrency, where many processes run at the same time."

Concurrency is not parallelism! /whacks author over the head with a Go manual

Yeah, but what's the best way to explain concurrency to a general audience?

Let me give it a non-journalistic stab:

"A method of programming where you can safely allow many different, but related computations to occur simultaneously to arrive at a desired result. Thanks to the "safety" aspect, these computations can be automatically processed in parallel (at once) by many thousands of computers to increase the speed of the program, but no collisions of data processing will occur. In other words, no two parallel processes will work at cross purposes as a result of parallelization - when the code is written correctly and concurrently."

Language/platform choice explains why they need 50 engineers rather than 100. The trivial scope of the application explains why it's 50-100 and not 5000. It's a messaging service! If they weren't extending their application by developing new functionality then 50 even sounds like a lot (assuming they don't run any of their own hardware).

Don't forget they also have to develop the front-end applications, which include iOS, Android, web, ... That will probably be the largest part of their engineering effort.

I'll never understand why so many people prefered WhatsApp over anything that already existed previously and even worked better.

To elaborate, there are many reasons 1. They have a no ads policy which is a really godsend thing when other messengers had stickers, games and just plain annoying ads. 2. The ones that did not, for ex Google etc were not really made for phones. They understood the importance of using your contacts as social graph really really well. 3. They almost never experienced outages. 4. Had sensible defaults. 5. Their apps are lightweight (memory and cpu wise) compared to amount of time one spends on it. 6. Had no api and generally very low spam compared to sms. SMS has really high spam in the developing world. 7. Rich media compared to SMS and no character restrictions

I think west really hates it as most of the people there have iphone and they had this $1 signup which made it unpopular there. They never had that on android which made it a darling of non-west

Facebook Messenger has none of those problems and is better in every way than WhatsApp.

Because you can reach your friends and loved ones with WA. It is quite simple.

You can make a better IM with fewer people, when you don't have bloat like stickers market and celebrity chats. And don't try to push people to buy those stickers in every possible menu. (Hi Viber).

WA? I'm not familiar with that acronym.

Err, WhatsApp?

Thanks, I feel dumb. Although that makes his argument "WhatsApp is good because you can use it to keep in touch with friends and family" which is meaningless.

How do you mean meaningless? What do you do with a "good" IM app, if your loved ones aren't using it? The most of the relatives and friends already have WhatsApp installed and are using it. Can't contact them with Telegram, IRC, HipChat, Viber, Skype, etc.

Well, that's a different argument. You could use hip chat to talk to your family and keep in touch, they just don't have it installed already.

Anyways, Facebook has more users than WhatsApp. Where do you live that people don't have Facebook? What is the advantage of having a WhatsApp account instead of or in addition to a Facebook account?

If it makes you feel any better I had the same question and had to look around for context!

Yeah, I've always used Google chat, which works from my computer too (I can type way faster with a keyboard). I do like Erlang, though.

because their product was and is the best.

How on earth is it better than Facebook Messenger?

I don't need a Facebook account to use it.

This articles doesn't look that convincing to me. I has no technical details to prove that Erlang was the major reason why WhatsApp was scalable. I think the low number of engineers has more to do with the simplicity of their product than with this particular language choice.

WhatsApp engineers themselves said Erlang was the main reason they were able to scale as well as they did.

Didn't they get a big head start from ejabberd? I hope they gave them some stock.

Yes I think so

I have to say I was expecting this to be a little older - it's really impressive that Facebook have kept the culture and tiny headcount of that team.

I doubt it's ever a good idea for a company like Facebook to do layoffs but I wonder if there are any lessons from the WhatsApp team for a company that size - their intern cohort looked way bigger than 50 and they seem to have almost 50 offices [0]. Obviously a very different product and much more complex but it's interesting to wonder what the same product led by Jan Koum would hypothetically look like.

[0] http://newsroom.fb.com/company-info/

I wish there were some good online resources around Erlang. Most of the content is very theoretical and not explanatory. Its hard to find implementation of common algorithms like Sorting, graphs, link-list and other dataStructures in erlang.

Uh...what exactly are you looking to learn? If you're looking to learn the language, there are plenty of resources online (Fred Hebert's Learn You Some Erlang For Great Good and Erlang in Anger are great as introductory, and intermediate texts, respectively).

If you already know the language fundamentals...you'd not be asking about linked lists; you can only have singly linked lists in an immutable language (without extremely bad performance, that requires every update/insert/delete to re-copy the entire list), and they're so fundamental that the language's core has them for you. And most of the common data structures are well discussed in Learn You Some Erlang For Great Good. Sorting, eh, https://gillesleblanc.wordpress.com/2012/05/12/sorting-algor... . Graphs, you need to narrow down a bit, different types of graphs require different implementations, and due to the immutableness of Erlang will likely require thinking about in a different way than in a mutable language.

Learn You Some Erlang for Great Good is nice in my opinion: http://learnyousomeerlang.com/

But an even better idea is to check out Elixir http://elixir-lang.org/ and http://www.phoenixframework.org/ which have been gaining a lot of steam as of late.

I haven't taken the Erlang plunge yet, but if I did, I'd probably try starting with Elixir, a language written in Erlang. There is a growing amount of buzz, community, tooling, etc. A basic understanding of Elixir would probably make Erlang a lot easier to understand.

> A basic understanding of Elixir would probably make Erlang a lot easier to understand.

It does, can personally confirm.

Another vote for Elixir. Well-documented with a growing community, and the code is very readable.

Yup, Elixir is fantastic.

Check out: http://rosettacode.org/wiki/Erlang for some erlang implementation examples of common algorithms

The language and culture of simplicity are great aspirations, all companies should look at doing this. However, not all companies are going to get such a huge benefit, as not all companies operate within a narrow problem domain. INSTAGRAM is another similar case: relatively simple solution (share photos with limitations), uses only single language PHP (at least since last I heard).

I mean this is partly a reflection of the teams brilliance, and the foresight. But its also that the operational cost is relatively low compared to a payroll system that needs to abide by government regulations and reporting requirements (for instance).

PHP? They're known for being a huge Django (Python) success. Or did fb converted them to HipHop?

Still Python here

I think part of it is their awesome product design: their app has few features, but they are well thought out and enough to make WhatsApp very useful. Fewer features mean less people needed for development and operations.

I would love to see a list of these 50 engineers, their skills and how they are organized. It provides guidance for other teams (even if part of their software is written in Erlang!).

Type "Whatsapp" into LinkedIn and you will get some idea, but probably biased towards more junior people. I agree would be interesting to see.

Beyond the individual roles it would be nice to know about their organization.

For reference, Level Money sold to C1 and had 1 backend engineer, 1 android engineer, and 1 ios engineer.

This scale isn't unusual at all. Really it's a lot more about feature development. The smart way to build most mobile startups is to use managed providers like google app engine, AWS Container Service, or Heroku. Between that and how not-bad both Android and iOS are to develop for these days (compared to their history), it's possible to get your engineering team size pretty small.

>This scale isn't unusual at all

How many apps are used by 13% of the world population every month?

Depending on your architecture, this difference is often immaterial. That's what people don't get.

When architected correctly, the actual amount of code to be written and maintained is quite low. And an easy way to jump-start that architecture is to have other people who have amortized the cost into a service model do that work for you.

"Enlightened Product Management" is the phrase I've heard to describe WhatsApp's success in keeping their engineering requirements to a bare minimum.

Question for HN: what is your estimate on the minimum man/womanpower needed to scale a product/service up to 10K users? 1M? 900M? For instance, what fraction of Facebook's work is related to making things scale? How much effort does a smaller company like Quora put into scaling for users? I imagine PaaS/IaaS services like Google App Engine and Amazon Elastic Beanstalk help a lot but I'm curious as to what you think.

Depends on the product!

Are you making something that searches the entire internet for relevant documents based on a custom query? Or are you sending a picture to another phone that goes away in < 5s? Or is this a blog?

If you're talking "minimum" then theoretically it could be 1 person. It's very easy to scale static pages. Heck - you could host a static page on S3.

Sure, but what's the most popular application hosted on AWS? Does it approach 900 million users?

It was probably Instagram before they moved to FB datacenters, with around 150-200 million monthly users ...


Maybe Reddit now then? 200 million monthly uniques:


Because they kept their product simple and focused, it does a few things well.

The Erlang thing is nice a nice fit, but mostly because they leveraged an open source product.

What I want to hear more about is how they got those users in the first place. Supporting 900M users might be easier then acquiring 900M users.

great product + word of mouth

I think this is the key line: “The number-one lesson is just be very focused on what you need to do”.

My sense is that WhatsApp spends all of its energy on the very core product offering and not a bunch of superfluous activities. I don't think the language choice has much to do with it unless there's some sort of "keep it simple" thinking that the languages somehow exude.

Does anyone know if WhatsApp uses Scrum (or similar methodology)? Also, do they do pair programming?

My company has recently learned about scrum and pair-programming, that seems like the only way to success to them. So, it would be nice to know how other successful companies are organized and develop software.

Only comments as to a part of your question, but: "Employees rarely attend a meeting". Stand-ups are still meetings.

I heard that they have the philosophy of "you build it, you own it", meaning that anything you build, you are also responsible for running. So if you don't want a call at 3am, make sure your code works correctly.

I did know WhatsApp uses Erlang which supports hot deployment. But after reading this article, I still don't know Why WhatsApp Only Needs 50 Engineers for Its 900M Users.

Why would you need more than 3 engineers?

This article should talk about what the 47 others are doing.

The reason why whatsapp can keep it small is because they decide features based on engineering cost first. Does the designer want a feature or UX design that would be a pain in the ass to create with this UX kit? Is there a probably uglier equivalent that would take 1/10th of the engineering time? It gets shot down and we do it the engineer-simpler way.

One UX example in the iphone app is the action sheet that pops up when you want to send photos or your location. While in facebook it gets embedded in a fancy keyboard drawer. The action sheet version probably took about 5 hours total for all of it, while facebook messenger's version probably took 500 hours minimum.

Another example on the backend is how they are relatively stateless, do not keep chat histories, do not have real multi-device w/ one account capabilities and so on. Each of those features would increase engineering and machine cost, sometimes significantly.

I totally agree with what you're saying. But remember that they got to 900M users with this approach. Obviously users liked something about what Whatsapp's philosophy produces.

Our company is solving a similar large-scale problem with very few engineers. And our answer, too, is Erlang! (And also, a few very smart, highly experienced, people with Math graduate degrees.)

So... what are you doing? Link?


You say this, of course, with the experience of supporting that many users and platforms... right?

Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact