日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

BeetleX 之 WebApi网关1.5.8发布

發(fā)布時間:2023/12/4 43 豆豆
生活随笔 收集整理的這篇文章主要介紹了 BeetleX 之 WebApi网关1.5.8发布 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

????????這一版本的主要升級了BeetleX的基礎網(wǎng)絡庫,主要解決在某些情況導致解釋http協(xié)議cpu暴增長的問題,同時使用BeetleX新版本針對的IndexOf的優(yōu)化,使http協(xié)議解釋上有著一定程度的性能提升。

????????新版本同樣也是支持win64和linux64兩個版本,具體安裝使用可查看

【BeetleX之Web網(wǎng)關1.5.7安裝使用】。以下相關功能使用截圖

性能測試

????????對于一個網(wǎng)關來說性能一個比較關心的指標,接下來針對1.5.8做一個簡單的吞吐測試。這些測試也只是簡單地測試一下,使用的操作系統(tǒng)是桌面版本的win10,cpu則是使用E1230V2一款非常老的4核8線程CPU,內存則是16GB,網(wǎng)絡則選用10Gb的光模(主要1Gb無法滿足測試的需求)。

為了能把網(wǎng)關服務壓到極限,所以壓測服務器和API服務器則選擇一臺20核32G內存的WIN2008服務器,確保壓測程序和API服務能夠滿足網(wǎng)關的需求。

????????這一次測試并不是簡單地返回一個字符串,而是更符合實際應用地返回不同大小的數(shù)據(jù)列表,結構如下:

[{"customerID": "ALFKI","companyName": "Alfreds Futterkiste","contactName": "Maria Anders","contactTitle": "Sales Representative","address": "Obere Str. 57","city": "Berlin","postalCode": "12209","country": "Germany","phone": "030-0074321","fax": "030-0076545"} ]

測試分了5個批次來進行,分別是獲取1,5,10,20和50個客戶信息。測試工具使用bombardier每次使用100并發(fā)壓測網(wǎng)關的響應吞吐能力。以下是測試的詳細結果:

D:\>bombardier.exe -c 100 -n 1000000 http://192.168.2.18/customers?count=1 Bombarding http://192.168.2.18/customers?count=1 with 1000000 request(s) using 1 00 connection(s)1000000 / 1000000 [==============================================] 100.00% 22s Done! Statistics Avg Stdev MaxReqs/sec 44083.12 3238.01 49047.30Latency 2.27ms 2.98ms 609.03msHTTP codes:1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0others - 0Throughput: 19.59MB/s D:\>bombardier.exe -c 100 -n 1000000 http://192.168.2.18/customers?count=5 Bombarding http://192.168.2.18/customers?count=5 with 1000000 request(s) using 1 00 connection(s)1000000 / 1000000 [==============================================] 100.00% 21s Done! Statistics Avg Stdev MaxReqs/sec 46818.87 5258.01 54296.74Latency 2.13ms 2.22ms 615.03msHTTP codes:1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0others - 0Throughput: 66.88MB/s D:\>bombardier.exe -c 100 -n 1000000 http://192.168.2.18/customers?count=10 Bombarding http://192.168.2.18/customers?count=10 with 1000000 request(s) using 100 connection(s)1000000 / 1000000 [==============================================] 100.00% 23s Done! Statistics Avg Stdev MaxReqs/sec 42954.14 4766.32 53000.00Latency 2.33ms 2.57ms 606.03msHTTP codes:1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0others - 0Throughput: 113.73MB/s D:\>bombardier.exe -c 100 -n 1000000 http://192.168.2.18/customers?count=20 Bombarding http://192.168.2.18/customers?count=20 with 1000000 request(s) using 100 connection(s)1000000 / 1000000 [==============================================] 100.00% 27s Done! Statistics Avg Stdev MaxReqs/sec 36768.81 1938.67 40747.56Latency 2.72ms 86.82us 30.00msHTTP codes:1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0others - 0Throughput: 184.96MB/s D:\>bombardier.exe -c 100 -n 1000000 http://192.168.2.18/customers?count=50 Bombarding http://192.168.2.18/customers?count=50 with 1000000 request(s) using 100 connection(s)1000000 / 1000000 [==============================================] 100.00% 39s Done! Statistics Avg Stdev MaxReqs/sec 25329.65 2414.78 28948.41Latency 3.94ms 2.41ms 626.03msHTTP codes:1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0others - 0Throughput: 314.18MB/s D:\>

以下是網(wǎng)關所在操作系統(tǒng)監(jiān)控50客戶個數(shù)獲取的帶寬情況,收發(fā)分別是2.8Gb,網(wǎng)關吞吐交互的總帶寬量在6Gb左右。


以上是1.5.8的一些性能測試情況,不過這次測試并沒有反映出網(wǎng)關的最高性能,畢竟操作系統(tǒng)并沒有使用服務器版本進行一個壓測。不過從數(shù)據(jù)來說在一臺這么舊的電腦上能達到這么高帶寬吞吐交互性上表現(xiàn)已經(jīng)非常出色。

(提醒:獨立版的網(wǎng)關并發(fā)受限,需要授權才能開啟更高并發(fā)。想做測試可以引用組件,組件代碼不限制,詳情可訪問:https://github.com/beetlex-io/Bumblebee)?

創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎

總結

以上是生活随笔為你收集整理的BeetleX 之 WebApi网关1.5.8发布的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。