What is distributed architecture
monomer
Distributed cluster
Distributed high availability
Build service clusters to improve load and avoid single points of failure
To respond to disasters, set up remote disaster preparedness, to prevent earthquakes and other natural disasters in the region
Traffic limiting on interfaces and service degradation. To prevent server failure caused by high concurrent load
Fault monitoring alarm
The scalability of the service makes it easy to scale the number of servers horizontally.
Use caching to reduce database stress
Use CDN to speed up access to static resources
What does distribution bring to the architecture
Application server cluster:
As the number of visits continues to increase, a single application server can no longer meet the demand, so we need to build application server clusters to provide services
Data load – Read/write separation
Data needs to be synchronized between the primary and secondary databases
You need to select data sources based on services
Search engine /Nosql load – Read/write separation
No (/ Elasticsearch, etc
Data volume pressure – Demeter/dewarehouse
Vertical split and horizontal split of data
=10 million, consider disassembling the table
= 100 million, warehouse demolition is considered
Application pressure – Application split
The application of split, according to the domain model of our users, goods, transactions into multiple subsystems
The foundation of realization in Taiwan – micro services
Case study – E-commerce system
System stratification, microservice management
Example – Nginx reverse proxy
Service layer shunt
Example – WCF distributed
Servers in each tier can scale horizontally (cluster) and vertically (shard by system/domain/function)
Case study – Microservices Architecture
The dumbbell architecture
Distributed integration of microservices
Bidirectional expansion of front end and back end.
Cloth – common pit – data consistency
1. Data consistency between systems.
2. Data consistency between applications within the system.
3, the internal application of multiple database data consistency, is an anti-pattern, do not do a general solution.
4. Data consistency of one database for multiple applications.
Distributed advantage
Distributed structure is to divide a complete system into independent subsystems according to business functions. In distributed structure, each subsystem is called “service”. These subsystems can run independently in a Web container