dm03514 / bcrypt-worker

1 stars 1 forks source link

Service Skeleton #2

Closed dm03514 closed 5 years ago

dm03514 commented 5 years ago

Basic Executable Service Skeleton with metrics.

dm03514 commented 5 years ago

screen shot 2018-10-30 at 9 02 32 am

dm03514 commented 5 years ago

Able to reach a steady state with a failing hash @10 requests / second on my poor virtualmachine :(

$ make stack
$ make load-test LOAD_TEST_RATE=10
echo "POST http://localhost:8080/decrypt" | vegeta attack -body tests/fixtures/password_no_match.json -rate=10 -duration=0 | tee results.bin | vegeta report
dm03514 commented 5 years ago

Sweet on my MBP 4 core 8 thread starting worker up with 5 decrypters:

$ make stack WORKER_NUM_DECRYPTERS=5

Able to handle 20 requests / second and keep latencies < 120ms max

$ make load-test LOAD_TEST_RATE=20
echo "POST http://localhost:8080/decrypt" | vegeta attack -body tests/fixtures/password_no_match.json -rate=20 -duration=0 | tee results.bin | vegeta report
Requests      [total, rate]            4337, 20.00
Duration      [total, attack, wait]    3m36.864626198s, 3m36.801482041s, 63.144157ms
**Latencies     [mean, 50, 95, 99, max]  66.720569ms, 65.657269ms, 72.371326ms, 82.587951ms, 114.292254ms**
Bytes In      [total, mean]            138320, 31.89
Bytes Out     [total, mean]            446711, 103.00
Success       [ratio]                  100.00%
Status Codes  [code:count]             200:4337
Error Set:

screen shot 2018-10-30 at 1 22 45 pm

I think there is good amount more tuning to do but this gives me an OK idea to start?

dm03514 commented 5 years ago

(outliers on HTTP request latency is from opening up programs on my machine :P )

dm03514 commented 5 years ago
screen shot 2018-10-30 at 8 04 45 pm
dm03514 commented 5 years ago
screen shot 2018-11-02 at 7 43 11 pm
dm03514 commented 5 years ago
screen shot 2018-11-02 at 7 53 25 pm