Cluster
Utiliza a biblioteca cluster
do nodejs para instanciar workers da API. Por default gera um worker para cada CPU.
Testes de stress com Siege usando 100 clientes concorrentes em um minuto:
- Rota
/api/v1/class?dims=region,state,location,adm_dependency_detailed
Sem cluster, com cache
Transactions: 7615 hits
Availability: 99.69 %
Elapsed time: 59.23 secs
Data transferred: 352.92 MB
Response time: 0.19 secs
Transaction rate: 128.57 trans/sec
Throughput: 5.96 MB/sec
Concurrency: 24.02
Successful transactions: 7615
Failed transactions: 24
Longest transaction: 29.23
Shortest transaction: 0.00
Com cluster, com cache
Transactions: 11724 hits
Availability: 100.00 %
Elapsed time: 59.48 secs
Data transferred: 543.35 MB
Response time: 0.01 secs
Transaction rate: 197.11 trans/sec
Throughput: 9.13 MB/sec
Concurrency: 1.68
Successful transactions: 11724
Failed transactions: 0
Longest transaction: 0.22
Shortest transaction: 0.00
- Rota
/api/v1/enrollment?dims=region,state,adm_dependency_detailed,school_year,education_level
Sem cluster, sem cache
Transactions: 5533 hits
Availability: 98.35 %
Elapsed time: 59.71 secs
Data transferred: 7715.37 MB
Response time: 0.06 secs
Transaction rate: 92.66 trans/sec
Throughput: 129.21 MB/sec
Concurrency: 5.61
Successful transactions: 5533
Failed transactions: 93
Longest transaction: 22.01
Shortest transaction: 0.00
Com cluster, sem cache
Transactions: 11267 hits
Availability: 100.00 %
Elapsed time: 60.04 secs
Data transferred: 15711.03 MB
Response time: 0.03 secs
Transaction rate: 187.66 trans/sec
Throughput: 261.68 MB/sec
Concurrency: 4.84
Successful transactions: 11267
Failed transactions: 0
Longest transaction: 2.52
Shortest transaction: 0.00