multithread_state/shared/set_subdomain.rb
:
- If i use
Tenant.subdomain ||= env['SERVER_NAME'].split('.')[0]
,Tenant.subdomain
will be the same till server restart. - So as i see i need to cleanup it or make singleton, which will be unique with every request.
multithread_state/shared/set_subdomain_singleton.rb
:
- Seems that i don't need to cleanup Tenant.subdomain after all. This data unique every request if i set it up at start.
$ siege -d1 -r10 -c 100 -i -b -f ./urls.txt
Transactions: 2000 hits
Availability: 100.00 %
Elapsed time: 4.67 secs
Data transferred: 0.04 MB
Response time: 0.23 secs
Transaction rate: 428.27 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 97.21
Successful transactions: 2000
Failed transactions: 0
Longest transaction: 0.36
Shortest transaction: 0.02