Moving image to Git for systems design

This commit is contained in:
Kalyanasundaram Somasundaram 2020-11-02 15:31:04 +05:30
parent 07de935afa
commit 3a215d2526
13 changed files with 9 additions and 9 deletions

View File

@ -84,5 +84,5 @@ https://engineering.linkedin.com/blog/2017/11/resilience-engineering-at-linkedin
Post our understanding about HA, our architecture diagram looks something like this below
![HA Block Diagram](https://user-images.githubusercontent.com/1917513/97536836-c21ec880-19e3-11eb-9e22-9baef14a70a4.jpg)
![HA Block Diagram](images/availability.jpg)

View File

@ -34,13 +34,13 @@ Systems should have a short circuit. Say in our content sharing system, if “No
Swimlane is one of the commonly used fault isolation methodology. Swimlane adds a barrier to the service from other services so that failure on either of them wont affect the other. Say we roll out a new feature Advertisement in our content sharing app.
We can have two architectures
![Swimlane](https://user-images.githubusercontent.com/1917513/97346462-79ff8900-18b1-11eb-9fe3-5bb42e4a9630.jpg)
![Swimlane](images/swimlane-1.jpg)
If Ads are generated on the fly synchronously during each Newsfeed request, the faults in Ads feature gets propagated to Newsfeed feature. Instead if we swimlane “Generation of Ads” service and use a shared storage to populate Newsfeed App, Ads failures wont cascade to Newsfeed and worst case if Ads dont meet SLA , we can have Newsfeed without Ads.
Let's take another example, we come up with a new model for our Content sharing App. Here we roll out enterprise content sharing App where enterprises pay for the service and the content should never be shared outside the enterprise.
![Swimlane-principles](https://user-images.githubusercontent.com/1917513/97346569-9f8c9280-18b1-11eb-942e-9274a7ac50ef.jpg)
![Swimlane-principles](images/swimlane-2.jpg)
### Swimlane Principles

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -42,5 +42,5 @@ This course will be a starter to make one think about scalability, availability,
Lets design a simple content sharing application where users can share photos, media in our application which can be liked by their friends. Lets start with a simple design of the application and evolve it as we learn system design concepts
![First architecture diagram](https://user-images.githubusercontent.com/1917513/97340392-b8914580-18a9-11eb-864d-c39728898a37.jpg)
![First architecture diagram](images/first-architecture.jpg)

View File

@ -19,7 +19,7 @@ Horizontal scaling stands for cloning of an application or service such that wo
Lets see how our monolithic application improves with this principle
![Horizontal Scaling](https://user-images.githubusercontent.com/1917513/97341202-c1cee200-18aa-11eb-9a36-92dc2d59a095.jpg)
![Horizontal Scaling](images/horizontal-scaling.jpg)
Here DB is scaled separately from the application. This is to let you know each components scaling capabilities can be different. Usually web applications can be scaled by adding resources unless there is no state stored inside the application. But DBs can be scaled only for Reads by adding more followers but Writes have to go to only one master to make sure data is consistent. There are some DBs which support multi master writes but we are keeping them out of scope at this point.
@ -94,7 +94,7 @@ More advanced client/server-side example techniques
CDNs are added closer to the clients location. If the app has static data like images, Javascript, CSS which dont change very often, they can be cached. Since our example is a content sharing site, static content can be cached in CDNs with a suitable expiry.
![CDN block diagram](https://user-images.githubusercontent.com/1917513/97535126-23916800-19e1-11eb-998c-40b8efad4bbd.jpg)
![CDN block diagram](images/cdn.jpg)
**WHAT:** Use CDNs (content delivery networks) to offload traffic from your site.
@ -123,7 +123,7 @@ This pattern represents the separation of work by service or function within the
Microservices can scale transactions, data sizes, and codebase sizes. They are most effective in scaling the size and complexity of your codebase. They tend to cost a bit more than horizontal scaling because the engineering team needs to rewrite services or, at the very least, disaggregate them from the original monolithic application.
![Microservices block diagram](https://user-images.githubusercontent.com/1917513/97342890-d2805780-18ac-11eb-8f6e-7437bedfe046.jpg)
![Microservices block diagram](images/microservices.jpg)
**WHAT:** Sometimes referred to as scale through services or resources, this rule focuses on scaling by splitting data sets, transactions, and engineering teams along verb (services) or noun (resources) boundaries.
@ -146,13 +146,13 @@ Very often, a lookup service or deterministic algorithm will need to be written
Sharding aids in scaling transaction growth, scaling instruction sets, and decreasing processing time (the last by limiting the data necessary to perform any transaction). This is more effective at scaling growth in customers or clients. It can aid with disaster recovery efforts, and limit the impact of incidents to only a specific segment of customers.
![Sharding-block-1](https://user-images.githubusercontent.com/1917513/97343099-16735c80-18ad-11eb-8bf5-f5a1370cd370.jpg)
![Sharding-block-1](images/sharding-1.jpg)
Here the auth data is sharded based on user names so that DBs can respond faster as the amount of data DBs have to work on has drastically reduced during queries.
There can be other ways to split
![Sharding-block-2](https://user-images.githubusercontent.com/1917513/97343189-3440c180-18ad-11eb-8e3c-ae1afbe62431.jpg)
![Sharding-block-2](images/sharding-2.jpg)
Here the whole data centre is split and replicated and clients are directed to a data centre based on their geography. This helps in improving performance as clients are directed to the closest Data centre and performance increases as we add more data centres. There are some replication and consistency overhead with this approach one needs to be aware of. This also gives fault tolerance by rolling out test features to one site and rollback if there is an impact to that geography