1

camel-jetty コンシューマーを使用した akka (Java) アプリケーションがあります。最小限の負荷 (約 10 TPS) で、クライアントに HTTP 503 エラーが表示され始めます。私たちのラボで問題を再現しようとしましたが、jetty は重複する HTTP リクエストを処理できないようです。以下は、Apache ベンチ (ab) からの出力です。

ab は、1 つのスレッドを使用して 10 個のリクエストを送信します (つまり、一度に 1 つのリクエスト)。

ab -n 10 -c 1 -p bad.txt http://192.168.20.103:8899/pim

Benchmarking 192.168.20.103 (be patient).....done


Server Software:        Jetty(8.1.16.v20140903)
Server Hostname:        192.168.20.103
Server Port:            8899

Document Path:          /pim
Document Length:        33 bytes

Concurrency Level:      1
Time taken for tests:   0.61265 seconds
Complete requests:      10
Failed requests:        0

Requests per second:    163.23 [#/sec] (mean)
Time per request:       6.126 [ms] (mean)
Time per request:       6.126 [ms] (mean, across all concurrent requests)

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.0      1       2
Processing:     3    4   1.8      5       7
Waiting:        2    4   1.8      5       7
Total:          3    5   1.9      6       8

Percentage of the requests served within a certain time (ms)
  50%      6
  66%      6
  75%      6
  80%      8
  90%      8
  95%      8
  98%      8
  99%      8
  100%      8 (longest request)

ab は、2 つのスレッドを使用して 10 個のリクエストを送信します (同時に最大 2 つのリクエスト)。

ab -n 10 -c 2 -p bad.txt http://192.168.20.103:8899/pim


Benchmarking 192.168.20.103 (be patient).....done


Server Software:        Jetty(8.1.16.v20140903)
Server Hostname:        192.168.20.103
Server Port:            8899

Document Path:          /pim
Document Length:        33 bytes

Concurrency Level:      2
Time taken for tests:   30.24549 seconds
Complete requests:      10
Failed requests:        1
   (Connect: 0, Length: 1, Exceptions: 0)

// obmited for clarity


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.9      1       2
Processing:     3 3005 9492.9      4   30023
Waiting:        2 3005 9492.7      3   30022
Total:          3 3006 9493.0      5   30024


Percentage of the requests served within a certain time (ms)
  50%      5
  66%      5
  75%      7
  80%      7
  90%  30024
  95%  30024
  98%  30024
  99%  30024
  100%  30024 (longest request)

桟橋がこれほど悪いとは思いません。うまくいけば、それは単なる構成の問題です。これは私のキャメル コンシューマー URI の設定です。

"jetty:http://0.0.0.0:8899/pim?replyTimeout=70000&autoAck=false"

akka 2.3.12 と camel-jetty 2.15.2 を使用しています

4

2 に答える 2