We know that fabric middleware can realize the functions of automatic switch of HA fault, horizontal partition, read and write load, etc. No additional agents to install, easy to use. Is there a performance bottleneck in the fabric itself?
So, next we're going to stress test the fabric middleware.
Ideas:
Fabric middleware is primarily a routing feature, and once the client connection pool is initialized, the relationship with fabric is already small. Of course, there are some connection pools that are configured to periodically detect the health status of the connection pool, and the fabric is connected at timed intervals.
Therefore, the stress of the Fabric middleware server is the initialization of the connection. The compaction of the fabric middleware becomes a voltage measurement of the processing power of the fabric connection request.
Pressure measurement process:
Overwrite the Java Connection Fabric jar package: The implementation only connects to fabric and does not connect to the business library.
Write a JSP page to loop through the fabric's connection actions (deliberately not using a connection pool to achieve the effect of the test, and only do the fabric-connected actions, not connected to the business database).
Results of pressure measurement:
It took 376 seconds to connect fabric requests 10,000 times. That is, you can request 26.6 connections per second, and each connection consumes 37.6ms.
To calculate:
Assuming that there are 500 applications (that is, 500 connection pools), each connection pool initializes 100 connections, the fabric middleware can process 26.6 times per second, and we calculate this by 25 times, the connection initialization time for 500 applications is:
500*100/25/60=33.33 minutes.
That is to say: if the engine room power outage, and then fabric Middleware 500 applications are to come up to initialize the connection pool, it will take 33 minutes to fully initialize the good.
Of course, the actual situation is that the application of the connection pool initialization is usually some of the first, not all of a sudden, but we need to know that such a large connection, suddenly hold up, it is very time-consuming.
Pressure measurement process, hardware Resource usage: IO usage is around 0.3%, CPU utilization is 5%. That is, the use of hardware is still very low.
Add:
Fabric's connection is the XMLRPC protocol, and the client's fabric connection request, actually made two connection fabric database (Note: Not the business database, but the fabric database, that is backing store OH), Operate the Fabric Database 10 times (6 times select,4 Insert) simultaneously. As a result, fabric connection requests are much less efficient than JDBC direct.
This article is from the "unrivaled Ancient and modern" blog, please be sure to keep this source http://nycle.blog.51cto.com/1119720/1614503
Mysqlfabric pressure test