System hierarchy
Any system according to the logical deployment dimension can be divided into the application layer and infrastructure layer, and the development of application software and using third-party applications can be abstracted as a collection of components, in order to run these components needed infrastructure layer to provide support, infrastructure layer has a physical machine, container, storage, virtual machine these elements.
In the infrastructure layer, the most basic is the physical machine. With the development of technology, virtual machines and containers gradually appear.
Let’s start by looking at the evolution of the infrastructure architecture.
Infrastructure architecture evolution
Infrastructure architecture is not a one-step thing, but needs to be improved gradually in a cycle, as the system complexity increases and business development continues to evolve. Next, let’s take the most basic architecture like Ngnix+ Web + DB to see the evolution process of a system’s infrastructure from simple to complex:
A host runs multiple components
In the initial stage of system on-line, the number of users is relatively small, and the requirements for system availability are also relatively low. This allows us to deploy all components on one host.
A host runs a component
With the development of system services, the system has performance requirements. At this time, the system needs to be deployed independently. When one component is deployed on one machine, the configurations of each machine are different, for example, the configurations of database and Web server are higher.
A component runs on multiple hosts
With the continuous development of services, the system has availability requirements. At this time, components need to be deployed in multiple instances. Each instance is deployed on different machines, and cluster software is used to support active/standby switchover.
There are multiple hosts, each of which runs multiple components and provides load balancing and active/standby switchover mechanisms
As system complexity increases, more and more components are deployed. The cost of deploying a component on a single machine would increase too quickly, and the cost of resources would lead to a cross-over deployment architecture. Multiple components are deployed on a single machine, but they are deployed across each other. This ensures that there are multiple instances of the component and at least one instance is available if any machine goes down.
A component runs on one VIRTUAL machine, and a physical machine runs on multiple virtual machines
The performance of physical machines is relatively high. If only several components are deployed on a physical machine, it is a waste of physical machines. In order to improve resource utilization of physical machines, physical machines are divided into virtual machines to provide external deployment capabilities.
A physical machine is divided into several VMS, and these components are deployed on these VMS. In this way, the full use of resources is realized and the availability of the system and the convenience of operation and maintenance are improved.
A component runs with one container, and a physical machine runs with multiple containers
Further down the road, we can replace virtual machines with container implementations, which are lighter technologies and use containers for higher resource utilization
This is a process of system infrastructure evolution. Of course, these solutions do not mean that only one of them can be selected. They can be used in combination according to actual scenarios to evolve into a mixture of physical machines, virtual machines, and containers.
Core infrastructure issues
Infrastructure, in principle, addresses the mapping of components to the operating environment. Infrastructure architecture needs to consider the following ten core issues:
- What kind of host hardware configuration must be selected to support component deployment?
- Mapping between hosts and components What is the relationship between hosts and components? Which components are deployed on which hosts?
- Host management How do I manage these hosts?
- Component Management How do you manage many components?
- Environment Isolation How are different development environments isolated from each other?
- Resource isolation Too many resources for one component will lead to fewer resources for other components. How do you allocate appropriate resources to components?
- Overall Resource usage Is the system usage in an appropriate state?
- Performance Can the performance of each component in the deployment architecture be guaranteed? Will there be bottlenecks?
- Availability If the host is down, can the system availability be guaranteed?
- How does the cost support all the components on a limited budget, or can the budget be saved with some good design?
An infrastructure architecture that considers the above core issues is a good architecture. The solution of these core issues requires an architect to have a certain understanding of servers, networks, and storage. Pay attention to this series of articles to help you solve these problems.
Here for everyone to prepare a small gift, pay attention to the public number, enter the following code, you can get baidu network disk address, no routine to receive!
004: “Internet Architecture Teaching Video” 006: “SpringBoot Implementation of Ordering System” 007: “SpringSecurity combat video” 008: “Hadoop combat teaching video” 009: “Tencent 2019Techo Developer Conference PPT” 010: wechat communication group