Performance Test Report
Conclusion: on-line to meet the conditions, the volume of gray on the line and follow recommendations peak bandwidth consumption trend.
Testing process
Estimated sphere of influence:
On a custom template range estimating line properties affect mainly H5 template information renderer, a new interface views with reference to the H5 line PV, to be carried in single 700 + QPS
Test interfaces: an interface template information template-info
/service/article/template-info
Parameters content:
{"mask_id":"${article}"}
Select the article musk_id active users csv config file to cache
Return result mainly in two ways:
1, the article did not use a template that is no template article
2, the article uses the template, the server will return the template information
Body body found there may be a greater risk.
The first pressure measurement results analysis
QPS guess bottleneck in the article-6 exit insufficient bandwidth
Analysis of measurement results of the second pressure
Aritcl-6 modified the bandwidth of 20M, qps not rise
After the final positioning of the current exclusion QPS slb bottleneck that limits the number of connections
slb connections monitoring ⬇️
Slb line connecting the maximum number of 100,000 so this problem does not exist
The current number of connections can be via direct connection or modified gray slb article-6 machine circumvent this problem
In order to quickly verify the results quickly, article-6 attempts to access the network through a direct connection can be found in
[root@test-perf 5.4]# curl -X POST http://172.17.27.196:81/service/article/template-info -d '{"mask_id":"jogo4fc"}'
{"code":1000,"err":false,"msg":null,"data":{}}
After modifying the third pressure measurement results analysis
Stand-alone QPS finally succeeded in rising to 1400 + security zone (peak single line network around 700QPS), but focus on other indicators found the problem:
1, as originally estimated risk, corresponding to peak when the QPS high bandwidth requirements, the bandwidth required to achieve single 130m, while net current machine configuration generally can not be achieved ⬇️
2, the test machine CPU consumes more than 90%
Body Analysis
Use template gripping articles returned from the server for analysis
Found configuration issued by a large number of images returned directly after base64 encoded [Behind his] [Behind his] [Behind his]
amendment:
Image CDN instead issued, modified server response body:
{"code":1000,"err":false,"msg":null,"data":{"id":0,"template_id":0,"bg_img":null,"music_id":0,"config":{"article":{"bg":-1,"bgImg":"\/\/ss2.meipian.me\/cdn\/series\/img\/mp-article-bg.ccafa4d.png","fixed":-1,"fixedBgImg":"\/\/ss2.meipian.me\/cdn\/series\/img\/mp-article-bg-fixed.ccafa4d.png","fixedMask":"\/\/ss2.meipian.me\/cdn\/series\/img\/mp-article-bg-fixed-mask.ccafa4d.png"},"caption":{"bgImg":"\/\/ss2.meipian.me\/cdn\/series\/img\/mp-article-caption-bg.ccafa4d.png","style":0,"top":""},"colors":{"s1":"#333333","s2":"#9b9b9b","s3":"#2F92FF","s4":"#FF6C18","s5":"#ffffff","s6":"#ffffff"},"editor":["#333333","#9B9B9B","#ED2308","#FF8A00","#39B54A","#167EFB","#B06FBB"],"images":{"borderImg":"\/\/ss2.meipian.me\/cdn\/series\/img\/mp-article-images-border.ccafa4d.png","corner":0,"exif":-1,"group":{"g1":["","","",""]},"matrix":{"x1":[0,0,0,0]},"style":1,"type":0},"music":{"customBgImg":"\/\/ss2.meipian.me\/cdn\/series\/img\/mp-article-music-fixed-custom-bg.ccafa4d.png","style":0,"type":0},"scene":{"imgs":[],"number":20,"type":-1},"template":"basis","videos":1},"template_config":null}}
Pictures of the Seven cattle access
bgImg":"\/\/ss2.meipian.me\/cdn\/series\/img\/mp-article-bg.ccafa4d.png"
After optimization of the fourth pressure measurement results analysis
QPS rise to 200 + 1600, reducing bandwidth by six times.
Basically meet the conditions on the line, but need to focus on the corresponding line and make adjustments during the bandwidth consumption peak.