reboottime / WebDevelopment

Some notes, thoughts and articles aggregated here about UI/UX and web development.
6 stars 0 forks source link

[System Design] Scale From Zero To Millions Of Users #31

Open reboottime opened 1 year ago

reboottime commented 1 year ago

1. How Web browser, DNS server, and web server work together

image

2. RDMS VS NoSQL

Vertical scaling vs horizontal scaling

Horizontal scaling is more desirable for large-scale applications due to the limitations of vertical scaling.

reboottime commented 1 year ago

Load balancer, a horizontal scaling solution at web tier

image
reboottime commented 1 year ago

Database replicas, a database tier scaling solution

High traffic read or write or both read and write could happen on database component in the whole web application system

image

The solution to mitgate the database bottom neck is using database replicas.

image

Two complicated questions

reboottime commented 1 year ago

Cache

A cache is a temporary storage area that stores the result of expensive responses or frequently accessed data in memory so that subsequent requests are served more quickly.

reboottime commented 1 year ago

CDN

image
reboottime commented 1 year ago

So far, the whole application's high level view looks in this way

image
reboottime commented 1 year ago

Further improve the application scaling

Move stateful data outside of the web tier.

image
reboottime commented 1 year ago

Further scaling up

  1. Data Center:
    • geoDNS is a DNS service that allows domain names to be resolved to IP addresses based on the location of a user.
  2. Message Queue: A message queue is a durable component, stored in memory, that supports asynchronous communication.
  3. database sharding
    • sharding key
reboottime commented 1 year ago

References

All the resources are from https://bytebytego.com/courses/system-design-interview/scale-from-zero-to-millions-of-users