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

System Design - Numbers You Should Know

This will help you pretty much all areas as a developer. For example, if you want to estimate cost of your own side project before you take the time to implement and write a bunch of code, you can use this stuff to make those rough estimates and give you an idea whether it’s even profitable. It also help you from nightmare scenario where maybe you have a small side project, and all of a sudden it goes viral and the person’s left with thousands of dollars in cloud hosting bills....

March 5, 2017 · 5 min · 1061 words · Eric