System Design Note - Core Concept  [draft]

Vertical Scaling vs Horizontal Scaling Vertical Scaling scale-up, add more CPU/Memory/Disk on the same server. Horizontal Scaling scale-out, add more servers. Load Balancer (LB) A Load Balancer is a device/service that sits between the user and the server group, and act as an invisible facilitator, ensuring that all resource servers are used equally. Load Balancing can optimise the resource time and avoid unevenly overloading some compute nodes while other compute nodes are left idle....

October 31, 2017 · 1 min · 134 words · Eric

System Design VII - Database Design and Scaling

Database Scaling is one of the most important topics in System Design . Normally for any large scale application architecture, the database is usually going to be where your performance bottleneck is. That’s because while most of your application are essentially stateless, so that you can scale them horizontally as much as you need. All the applications will hit the database for retrieving data, or writing new data. Key Information Most of the large-scale web application are very read-intensive, usually around 95% read request and 5% write requests....

March 9, 2017 · 3 min · 505 words · Eric

System Design - Caching

Why Caching? Improve performance of application. Save money in long term. Speed and Performance Reading from memory is much faster than disk, 50~200x faster. Can serve the same amount of traffic with fewer resources. With the rapid performance benefits aforementioned, you can server much more many more requests per second with the same resources. Pre-calculate and cache data. This is something Twitter implemented, they occasionally pre-compute what your time-line is, i....

March 8, 2017 · 3 min · 632 words · Eric

System Design - Load Balancer

Load Balancer Balance incoming traffic to multiple servers. Software or Hardware based. Used to improve reliability and scalability of application. Nginx, HAProxy, F5, Citrix Load Balancer Routing Methods Round Robin. Simplest type of routing. Can result in uneven traffic. For certain applications, not all requests are the same, some can have very database queries and results could be just by chance. Least Connections. Routes based on number of client connections to server....

March 7, 2017 · 2 min · 394 words · Eric

System Design - Vertical and Horizontal Scaling

There are two common ways to scale your application: Vertical Scaling and Horizontal Scaling . Let’s say you have your own web app and it’s running on a single server to start, the number of users rapidly growing, and you may start to meet some performance bottleneck in following aspect: CPU. If you are doing a certain function that requires a lot of processing power, like image conversion or video decoding....

March 6, 2017 · 3 min · 618 words · Eric