Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use "micro-service + cloud architecture" to easily deal with system expansion!

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

I don't know if you open this article and have you noticed the classification node where the article is located: cloud computing. In fact, my intention is to categorize micro-services with cloud architecture. Because they all have the same purpose of existence: to facilitate expansion!

Expand capacity. For those systems that have encountered system bottlenecks and need to be expanded, congratulations, your system must have developed rapidly and encountered a rise in traffic!

[cloud architecture, system expansion case]

First of all, let's talk about my personal experience: I do GPS alarm system, and the hardware needs to send data back to the background server, so the better the hardware products sell, my system needs to face more and more pressure challenges. Thanks for going through such a process, I am deeply aware of the great value of the system expansion architecture design. In my project, I have experienced three stages:

The first stage: stand-alone stage

Stand-alone applications, single-process applications, it has been proved that only hundreds of devices can be carried concurrently.

Through the modification of multithreading, IOCP design model, it can carry more than 20000 concurrency.

Bottleneck: it is difficult to break through the concurrency ability of stand-alone applications, and you have to reconstruct every time you encounter difficulties. In my case, it can be increased to 30000 load, less than 500 million load!

Phase 2: manually split multi-server phase

Manual distributed separation design, website, socket receiver, cache, database, using self-built computer room to run independently. It has been proved that it can carry hundreds of thousands of devices concurrently.

Bottleneck: the number of concurrency of firewall devices in self-built computer room is limited, and the maximum number of connections allowed by CISCO ASA 5515 firewall is 250000.

Phase 3: cloud Architecture Pha

Cloud architecture design, by modifying the system to achieve automatic expansion. At this time, no matter how many client devices are, because the number of ECS servers after Aliyun's SLB can be added or reduced at any time. At present, there is no pressure on more than 1 million devices to connect concurrently.

Bottleneck: only for me, the database pressure needs to be further optimized in the future, but there is no pressure on millions of concurrent devices, but Aliyun's distributed database DRDS seems to be able to solve my difficulties.

[micro-service, modular application case]

In my case, I focused on the role of cloud architecture and did not focus on the role of microservices. But in fact, a little bit of microservice functionality has been used in several transformations:

Modular function, just now my case is based on the overall system split, in fact, there is room for optimization is to transform into micro-services. "Micro-service applications" for example:

Login system function: at present, there are at most a few hundred login users at the same time. The login function code is released with the website as a whole, and dozens of web machines need to be maintained and updated at once under load balancing, which is obviously too superfluous. If the login function is released separately as a "micro-service" component, it would be more than enough to use only two web machines ("login function dedicated server") to specifically load the login function stamp. In the future, this part of the system pressure will increase, only need to add a "login server".

Query and location function: everyone's location page is refreshed with high frequency, although only a few hundred people log in, but the number of visits is as high as tens of thousands of times. What shall I do? Specially take out more than a dozen web servers for "locating query servers". In this way, if there is a problem with the location function, you only need to troubleshoot the problem from these more than a dozen "location query servers"!

Conclusion: the purpose of micro-service is the functional separation at the software development level. For the use of microservices: small projects are laborious and large projects are easy to use.

So it leads to a variety of views:

People who have not been exposed to large projects think that micro-service is an encumbrance.

People who have come into contact with large projects acknowledge the value of micro-services, but do not recommend that small projects use micro-services to "shoot mosquitoes with anti-aircraft guns."

People who have been doing large traffic projects advocate the use of micro-services.

[conclusion]

The value of micro-services: when the number of visitors increases in the future, the function of accurately regulating a bottleneck is mainly a reserve at the development level.

The value of cloud architecture: when the traffic increases, it directly increases the number of servers and expands the system load threshold, which mainly belongs to the reserve at the operation and maintenance level.

Microservices + cloud architecture: an important combination of large-scale systems!

Original address: updated editors of https://www.opengps.cn/Blog/View.aspx?id=279 articles are subject to this link. Welcome to follow the original articles of Origin Server!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report