Alex Xu (@alexxubyte) on X

X (formerly Twitter) ยท

2 min read Original article โ†—

Post

Post

Alex Xu on X: "/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!"

  • user avatar

    /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!

  • user avatar

    /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.

    user avatar

    /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.

    user avatar

    /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.

    user avatar

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

    user avatar

    user avatar

    Also drew a version like this. Which one do you like?

  • user avatar

    They previously eluded to that this was to some extend due to Microsoft licenses being by machine and that it was cheaper to increase the machines capacity then add licenses. Also, if its not broken, why change it? Nothing wrong with a well tested, well structured monolith.