The theoretical knowledge that architects have to understand-infrastructure architecture

System hierarchy

Any system can be divided into application layer and infrastructure layer according to the logical deployment dimension. The developed application software and third-party applications can be abstracted into a collection of components. In order to run these components, the infrastructure layer is required to provide support. The facility layer has elements such as physical machines, storage, virtual machines, and containers.

image.png

The most basic in the infrastructure layer is the physical machine. With the development of technology, virtual machines and containers have slowly appeared.

Let's first look at the evolution of infrastructure architecture.

Infrastructure evolution

The infrastructure structure is not a one-step thing, it needs to be improved gradually and continuously, as the complexity of the system increases and business development continues to evolve. Next, let's take a look at the evolution of a system's infrastructure from simple to complex with the most basic architecture like Ngnix+web+db:

One host runs multiple components

In the initial stage of system launch, the number of users is relatively small, and the requirements for system availability are relatively low. In this way, we can deploy all components on one host.
image.png

One host runs one component

With the development of system business, the system has performance requirements. At this time, it needs to be deployed independently. When a component is deployed on a machine, the configuration of each machine is different. For example, the database and web server configuration will be higher. .
image.png

One component runs on multiple hosts

As the business continues to develop, the system has requirements in terms of availability. At this time, components need to be deployed in multiple instances. Each instance is deployed on a different machine. The cluster software is used to support active/standby switching. An architecture that guarantees performance and availability.
image.png

There are multiple hosts, each running multiple components, with load balancing and active/standby switching mechanism

As the complexity of the system increases, more and more components are deployed. If another machine is used to deploy a component, it will cause operating costs to rise too fast. Considering the resource cost, a cross-type deployment architecture will be considered. Multiple components are deployed on a machine, but they are deployed in a cross-section. This not only ensures that the component has multiple instances, but also ensures that at least one instance can provide services if any machine hangs up.
image.png

One component runs on one virtual machine, and one physical machine runs multiple virtual machines

The performance of physical machines is relatively high. If only a few components are deployed on a physical machine, it is actually a waste of physical machines. In order to improve the resource utilization of the physical machine, we split the physical machine into virtual machines to provide external deployment capabilities.
image.png

A physical machine is first divided into several virtual machines, and these components are deployed in these virtual machines. In this way, the full utilization of resources is realized, and the usability of the system and the convenience of operation and maintenance are also improved.

One component runs in one container, and multiple containers run on one physical machine

In the future, we can replace the virtual machine with a container. Container is a lighter technology, and the use of containers can have a higher resource utilization rate.
image.png

This is a process of system infrastructure evolution. Of course, these solutions do not mean that you can only choose one of them. They can be combined and used according to actual scenarios to evolve into a hybrid state of both physical machines, virtual machines, and containers.

Core issues of infrastructure

In principle, infrastructure is to solve the problem of mapping components to the operating environment. The infrastructure architecture needs to consider the following ten core issues:

  • Host hardware configuration
    What configuration needs to be selected to support component deployment?
  • Correspondence between
    host and component What is the relationship between host and component? Which components are deployed on which hosts?
  • Host management
    How to manage these hosts?
  • Component management
    How to manage numerous components?
  • Environment isolation
    How to isolate different development environments?
  • Resource isolation If
    one component takes up too many resources, it will inevitably lead to fewer resources in other components? How to allocate appropriate resources to components?
  • Overall resource utilization Is the utilization rate of the
    system in a reasonable state?
  • Performance
    Can the performance of each component under the deployment architecture be guaranteed? Will there be a bottleneck?
  • Availability
    Can the availability of the system be guaranteed when the host is down?
  • Cost
    How to support the operation of all components within a limited budget, or is it possible to save the budget through some good design?

The infrastructure architecture made by considering the above core issues is a good architecture. The solution of these core issues requires the architect to have a certain understanding of server, network, storage and other knowledge. Pay attention to this series of articles to help you solve these problems. problem.

Insert picture description here

Guess you like

Origin blog.csdn.net/jianzhang11/article/details/106494693