/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?
/6 Reference:
[1] Podcast by @rla4 and@shanselman: https://hanselminutes.com/847/engineering-stack-overflow-with-roberta-arcoverde
[2] https://stackexchange.com/performance