Backend work behind apps like Facebook, Instagram and WhatsApp is about serving a feed, a message or a notification to a very large number of people at once, while respecting who is allowed to see what. Prepare to talk through feed building, message delivery to phones that go offline, counters on very popular posts, and privacy checks on every read. What to show here: designs that hold under huge traffic and respect audience settings. Each question below has what the interviewer is checking, an answer frame and a sample spoken answer to adapt.
How Meta hires, in its own words, and its questions for every job →
“I once added a query to load recent comments for a post. It was fast in testing, where posts had a handful of comments. In production, a few posts had a huge number, and the query slowed the whole database. I saw the latency graph climb within minutes of release, turned the feature flag off, and traced the slow queries. The fix was a proper index and a page limit. Since then I test with data shaped like the worst real case, not the average one, and I release behind a flag to a small share first. The outcome was your result.”
Weak answers blame the test team or the load, and show no change in how they test afterwards.
“I was asked to add debug logging to a service that handled profile updates. The quick way was to log the whole request. I noticed that would write phone numbers and email addresses into logs that many engineers could read. I raised it with my lead and wrote a small helper that logged only field names and a masked id. It took an extra day. I also searched older log lines for the same problem and found two more places, which we fixed. Now I ask who can read a log before I write anything into it. The result was your result.”
Weak answers treat privacy as a legal team's job or cannot name a concrete step they took.
“Feeds are read far more often than posts are written, so I would prepare most of the feed ahead of time. When a normal account posts, the post id is pushed into a stored feed list for each follower. For accounts with a huge following, pushing to everyone is too costly, so their posts are pulled at read time and merged in. The feed service then ranks the merged candidates and returns a page. I would store only ids in the feed lists and fetch post content from a cache. Deleted or hidden posts are filtered at read time so they vanish at once.”
Weak answers pick only one approach and do not notice that very large accounts break it.
“Each message gets a unique id from the sender and a sequence number within its conversation from the server. The server keeps a queue per device, so a phone and a laptop are tracked apart. If a device is online, the message is pushed over its open connection. If not, it waits in the queue and a push notification is sent. The device acknowledges each message id, and only then is it removed from the queue. If an acknowledgement is lost, the server resends, and the device ignores ids it already has. Sequence numbers let the app show messages in the right order.”
Weak answers assume the receiver is always connected, or have no plan for a lost acknowledgement.
“One row taking every write becomes a bottleneck, because each update waits for the one before it. I would stop writing each view to the database directly. Views go into a stream, and a worker adds them up and writes the total every few seconds. Another option is to split the counter into several smaller counters picked at random and add them on read. The number on screen is rounded for very popular videos anyway, so a delay of a few seconds is fine. Where exact totals matter later, I would keep the raw events so exact totals can be rebuilt.”
Weak answers just add a bigger database server, or treat every counter as needing exact real-time accuracy.
“The risk is that one read path forgets the rule. So I would not let any endpoint fetch a post from storage directly. Every read goes through one data access layer that takes the viewer and the post, and returns the post only if the audience rule allows it. To keep it fast, the layer caches friend lists and the post's audience setting, and clears them when either changes. I would add tests that try each read path as a stranger, a friend and a blocked person. I would also log denied reads, because a sudden change there often means a bug.”
Weak answers copy the check into each endpoint, or apply it only in the user interface.
“I would first check the queue metrics to confirm that one post is producing most of the backlog. The urgent goal is to get normal notifications moving, such as a message from a friend. If the system allows it, I would move the large fan-out job to its own queue with its own workers, or pause it briefly while the rest drains. Then I would let it continue at a limited rate. Followers of a big account can wait a few minutes. Afterwards I would make this permanent: separate queues by job size, a rate limit per sender, and an alert on queue age.”
Weak answers only add more workers, or do nothing to stop one sender from starving everyone else.
“I enjoy backend problems where the simple design stops working because of size. At Meta, a feed, a like count or a message has to work for a very large number of people at once, and ordinary answers like one database row per counter break. I have worked on services with fan-out and queues, and the parts I liked most were finding the hot spots and designing around them. I also care about getting privacy rules right in the data layer, not as an afterthought. I want to get better at designing systems that stay simple to reason about as they grow.”
Weak answers mention scale as a slogan without naming a single problem it creates.
No figures on this page: pay depends on the level, the city and the offer in front of you. When the offer comes, the free salary negotiation script helps with that part.
ClapAssist is an AI interview assistant for Mac and Windows. It listens to the interview on your computer and shows you what to say, in short lines you can read while you talk. Your live interview audio and screen are never stored. Your resume and notes are saved to your account so the app fills them in on any computer. It is hidden from screen share on every plan, including Free; only you can see it.