Preface
In a test of online business, I met a strange problem. After investigation, it is related to the synchronization of LVS and back-end application services. Now I share it as follows; and I make a simple summary of the basic knowledge of Web architecture and the possible problems of my personal experience.
phenomenon
- The burst interface is originally protected, that is, when the number of requests for an IP exceeds a certain threshold, it returns 403 (the normal request returns 200), but in a large number of multithreaded requests, some requests are still normal. As shown in the picture:
- A similar problem was found in a test of another business. A login interface starts to require the confirmation of the graphic verification code after many attempts, but when the user clicks the button for many times, the requirement of the graphic verification code disappears.
Reason
After the operation and maintenance troubleshooting, it was found that the root cause was the inconsistent configuration of multiple servers at the back end. For example, the code of three servers was the latest, with a protection policy, while the code of one server was not updated, without a protection policy. When multiple requests were made, LVS pointed the traffic to the server without a protection policy, and there was no requirement map for the response package Shape validation or response is normal, resulting in packets in multiple requests that do not need to be validated.
Test method and utilization
Multithreaded, highly concurrent requests; the normal requests in these large number of abnormal packets may also be utilized. For example, if LVS is a polling algorithm, there will be one available request every n times.
summary
Nowadays, web application is not the era of single server. There is always a huge web architecture to support an application. I have learned some basic knowledge and listed the possible problems in these architectures based on my experience.
Used to record knowledge through mind map, please click or right-click to view the large HD map:
Please visit GitHub to get the XMIND source file.