Alex Xu

/1 How will you design the Stack Overflow website? If your answer is on-premise servers and monolith (bottom), you would likely fail the interview, but that's how it is built in reality! https://t.co/gygb1HbzxN

/2 ๐–๐ก๐š๐ญ ๐ฉ๐ž๐จ๐ฉ๐ฅ๐ž ๐ญ๐ก๐ข๐ง๐ค ๐ข๐ญ ๐ฌ๐ก๐จ๐ฎ๐ฅ๐ ๐ฅ๐จ๐จ๐ค ๐ฅ๐ข๐ค๐ž

The interviewer is probably expecting something at the top.

1. Microservice is used to decompose the system into small components.
2. Each service has its own database. Use cache heavily. https://t.co/EK2FCK9T60

/3 3. The service is sharded.
4. The services talk to each other asynchronously through message queues.
5. The service is implemented using Event Sourcing with CQRS.
6. Showing off knowledge in distributed systems such as eventual consistency, CAP theorem, etc.

/4 ๐–๐ก๐š๐ญ ๐ข๐ญ ๐š๐œ๐ญ๐ฎ๐š๐ฅ๐ฅ๐ฒ ๐ข๐ฌ
Stack Overflow serves all the traffic with only 9 on-premise web servers, and itโ€™s on monolith! It has its own servers and does not run on the cloud.

This is contrary to all our popular beliefs these days. https://t.co/326qYYsmEG

/5 ๐Ÿ‘‰ Over to you: what is good architecture, the one that looks fancy during the interview or the one that works in reality?

Wed Oct 05 15:54:59 +0000 2022