From 94aea1576c7707cf4d02e94a0add4894081e9c95 Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Tue, 28 Feb 2017 05:01:15 -0800 Subject: [PATCH] Add Application layer section --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index 2f483b09..3fcd1406 100644 --- a/README.md +++ b/README.md @@ -845,3 +845,40 @@ Additional benefits include: * [NGINX architecture](https://www.nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/) * [HAProxy architecture guide](http://www.haproxy.org/download/1.2/doc/architecture.txt) * [Wikipedia](https://en.wikipedia.org/wiki/Reverse_proxy) + +## Application layer + +

+ +
+ Source: Intro to architecting systems for scale +

+ +Separating out the web layer from the application layer (also known as platform layer) allows you to scale and configure both layers independently. Adding a new API results in adding application servers without necessarily adding additional web servers. + +The **single responsibility principle** advocates for small and autonomous services that work together. Small teams with small services can plan more aggressively for rapid growth. + +Workers in the application layer also help enable [asynchronism](#asynchronism). + +### Microservices + +Related to this discussion are [microservices](https://en.wikipedia.org/wiki/Microservices), which can be described as a suite of independently deployable, small, modular services. Each service runs a unique process and communicates through a well-definied, lightweight mechanism to serve a business goal. 1 + +Pinterest, for example, could have the following microservices: user profile, follower, feed, search, photo upload, etc. + +### Service Discovery + +Systems such as [Zookeeper](http://www.slideshare.net/sauravhaloi/introduction-to-apache-zookeeper) can help services find each other by keeping track of registered names, addresses, ports, etc. + +### Disadvantage(s): application layer + +* Adding an application layer with loosely coupled services requires a different approach from an architectural, operations, and process viewpoint (vs a monolithic system). +* Microservices can add complexity in terms of deployments and operations. + +### Source(s) and further reading + +* [Intro to architecting systems for scale](http://lethain.com/introduction-to-architecting-systems-for-scale) +* [Crack the system design interview](http://www.puncsky.com/blog/2016/02/14/crack-the-system-design-interview/) +* [Service oriented architecture](https://en.wikipedia.org/wiki/Service-oriented_architecture) +* [Introduction to Zookeeper](http://www.slideshare.net/sauravhaloi/introduction-to-apache-zookeeper) +* [Here's what you need to know about building microservices](https://cloudncode.wordpress.com/2016/07/22/msa-getting-started/)