{"action":"closed","issue":{"url":"https://api.github.com/repos/kadirahq/flow-router/issues/267","labels_url":"https://api.github.com/repos/kadirahq/flow-router/issues/267/labels{/name}","comments_url":"https://api.github.com/repos/kadirahq/flow-router/issues/267/comments","events_url":"https://api.github.com/repos/kadirahq/flow-router/issues/267/events","html_url":"https://github.com/kadirahq/flow-router/issues/267","id":100360507,"number":267,"title":"flow-router-ssr degrade overall meteor performance","user":{"login":"meteor-software","id":5682894,"avatar_url":"https://avatars.githubusercontent.com/u/5682894?v=3","gravatar_id":"","url":"https://api.github.com/users/meteor-software","html_url":"https://github.com/meteor-software","followers_url":"https://api.github.com/users/meteor-software/followers","following_url":"https://api.github.com/users/meteor-software/following{/other_user}","gists_url":"https://api.github.com/users/meteor-software/gists{/gist_id}","starred_url":"https://api.github.com/users/meteor-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meteor-software/subscriptions","organizations_url":"https://api.github.com/users/meteor-software/orgs","repos_url":"https://api.github.com/users/meteor-software/repos","events_url":"https://api.github.com/users/meteor-software/events{/privacy}","received_events_url":"https://api.github.com/users/meteor-software/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-11T17:10:26Z","updated_at":"2015-08-11T17:21:34Z","closed_at":"2015-08-11T17:21:34Z","body":"Hi,\r\nI've made simple react meteor app using flow router, react-layout and picker. \r\nFor simplicity there are no subscriptions at all - nothing fancy.\r\nI have simple react page on path / and simple server side route on path /server/route\r\n\r\nMy tests (with apache benchmark) shows that flow-router-ssr degrade overall meteor performance. \r\nIt's more then 5 time slower compared to no-ssr version of flow router. \r\n\r\nIt's obvious that client side routes with ssr will be slower. \r\nBut why server side routes are affected?\r\n\r\nLook at Apache benchmark results:\r\n\r\n-----------------------------------------\r\nFLOW ROUTER (NO SSR) REACT PAGE LOADING TIME TESTED WITH APACHE BENCHMARK\r\n\r\n\r\nroot@tardis:/home/hex# ab -n 10000 -c150 http://localhost:3000/\r\nThis is ApacheBench, Version 2.3 <$Revision: 1638069 $>\r\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\r\nLicensed to The Apache Software Foundation, http://www.apache.org/\r\n\r\nBenchmarking localhost (be patient)\r\nCompleted 1000 requests\r\nCompleted 2000 requests\r\nCompleted 3000 requests\r\nCompleted 4000 requests\r\nCompleted 5000 requests\r\nCompleted 6000 requests\r\nCompleted 7000 requests\r\nCompleted 8000 requests\r\nCompleted 9000 requests\r\nCompleted 10000 requests\r\nFinished 10000 requests\r\n\r\n\r\nServer Software:        \r\nServer Hostname:        localhost\r\nServer Port:            3000\r\n\r\nDocument Path:          /\r\nDocument Length:        6735 bytes\r\n\r\nConcurrency Level:      150\r\nTime taken for tests:   4.955 seconds\r\nComplete requests:      10000\r\nFailed requests:        0\r\nTotal transferred:      68730000 bytes\r\nHTML transferred:       67350000 bytes\r\nRequests per second:    2018.27 [#/sec] (mean)\r\nTime per request:       74.321 [ms] (mean)\r\nTime per request:       0.495 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          13546.47 [Kbytes/sec] received\r\n\r\nConnection Times (ms)\r\n              min  mean[+/-sd] median   max\r\nConnect:        0    0   0.7      0       9\r\nProcessing:    23   74  13.7     69     172\r\nWaiting:       17   42  24.6     31     133\r\nTotal:         23   74  13.7     70     176\r\n\r\nPercentage of the requests served within a certain time (ms)\r\n  50%     70\r\n  66%     74\r\n  75%     77\r\n  80%     80\r\n  90%     92\r\n  95%    107\r\n  98%    111\r\n  99%    113\r\n 100%    176 (longest request)\r\n\r\n\r\n-----------------------------------------\r\nFLOW ROUTER (SSR) REACT PAGE LOADING TIME TESTED WITH APACHE BENCHMARK\r\n\r\nroot@tardis:/home/hex# ab -n 10000 -c150 http://localhost:3000/\r\nThis is ApacheBench, Version 2.3 <$Revision: 1638069 $>\r\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\r\nLicensed to The Apache Software Foundation, http://www.apache.org/\r\n\r\nBenchmarking localhost (be patient)\r\nCompleted 1000 requests\r\nCompleted 2000 requests\r\nCompleted 3000 requests\r\nCompleted 4000 requests\r\nCompleted 5000 requests\r\nCompleted 6000 requests\r\nCompleted 7000 requests\r\nCompleted 8000 requests\r\nCompleted 9000 requests\r\nCompleted 10000 requests\r\nFinished 10000 requests\r\n\r\n\r\nServer Software:        \r\nServer Hostname:        localhost\r\nServer Port:            3000\r\n\r\nDocument Path:          /\r\nDocument Length:        9299 bytes\r\n\r\nConcurrency Level:      150\r\nTime taken for tests:   31.942 seconds\r\nComplete requests:      10000\r\nFailed requests:        0\r\nTotal transferred:      94370000 bytes\r\nHTML transferred:       92990000 bytes\r\nRequests per second:    313.07 [#/sec] (mean)\r\nTime per request:       479.126 [ms] (mean)\r\nTime per request:       3.194 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          2885.20 [Kbytes/sec] received\r\n\r\nConnection Times (ms)\r\n              min  mean[+/-sd] median   max\r\nConnect:        0    0   0.7      0       8\r\nProcessing:   238  476  60.6    476     728\r\nWaiting:      237  439  60.0    436     690\r\nTotal:        244  476  60.5    476     732\r\n\r\nPercentage of the requests served within a certain time (ms)\r\n  50%    476\r\n  66%    500\r\n  75%    516\r\n  80%    528\r\n  90%    556\r\n  95%    577\r\n  98%    604\r\n  99%    616\r\n 100%    732 (longest request)\r\n\r\n\r\n-----------------------------------------\r\nFLOW ROUTER (NO SSR) PICKER SERVER ROUTE LOADING TIME TESTED WITH APACHE BENCHMARK\r\n\r\nroot@tardis:/home/hex# ab -n 10000 -c150 http://localhost:3000/server/route/\r\nThis is ApacheBench, Version 2.3 <$Revision: 1638069 $>\r\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\r\nLicensed to The Apache Software Foundation, http://www.apache.org/\r\n\r\nBenchmarking localhost (be patient)\r\nCompleted 1000 requests\r\nCompleted 2000 requests\r\nCompleted 3000 requests\r\nCompleted 4000 requests\r\nCompleted 5000 requests\r\nCompleted 6000 requests\r\nCompleted 7000 requests\r\nCompleted 8000 requests\r\nCompleted 9000 requests\r\nCompleted 10000 requests\r\nFinished 10000 requests\r\n\r\n\r\nServer Software:        \r\nServer Hostname:        localhost\r\nServer Port:            3000\r\n\r\nDocument Path:          /server/route/\r\nDocument Length:        22 bytes\r\n\r\nConcurrency Level:      150\r\nTime taken for tests:   5.289 seconds\r\nComplete requests:      10000\r\nFailed requests:        0\r\nTotal transferred:      1200000 bytes\r\nHTML transferred:       220000 bytes\r\nRequests per second:    1890.60 [#/sec] (mean)\r\nTime per request:       79.340 [ms] (mean)\r\nTime per request:       0.529 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          221.56 [Kbytes/sec] received\r\n\r\nConnection Times (ms)\r\n              min  mean[+/-sd] median   max\r\nConnect:        0    0   0.7      0       8\r\nProcessing:    25   79  16.8     80     128\r\nWaiting:       19   72  20.5     74     128\r\nTotal:         25   79  16.7     80     128\r\n\r\nPercentage of the requests served within a certain time (ms)\r\n  50%     80\r\n  66%     84\r\n  75%     89\r\n  80%     92\r\n  90%    102\r\n  95%    107\r\n  98%    112\r\n  99%    117\r\n 100%    128 (longest request)\r\n\r\n-----------------------------------------\r\nFLOW ROUTER (SSR) PICKER SERVER ROUTE LOADING TIME TESTED WITH APACHE BENCHMARK\r\n\r\nroot@tardis:/home/hex# ab -n 10000 -c150 http://localhost:3000/server/route/\r\nThis is ApacheBench, Version 2.3 <$Revision: 1638069 $>\r\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\r\nLicensed to The Apache Software Foundation, http://www.apache.org/\r\n\r\nBenchmarking localhost (be patient)\r\nCompleted 1000 requests\r\nCompleted 2000 requests\r\nCompleted 3000 requests\r\nCompleted 4000 requests\r\nCompleted 5000 requests\r\nCompleted 6000 requests\r\nCompleted 7000 requests\r\nCompleted 8000 requests\r\nCompleted 9000 requests\r\nCompleted 10000 requests\r\nFinished 10000 requests\r\n\r\n\r\nServer Software:        \r\nServer Hostname:        localhost\r\nServer Port:            3000\r\n\r\nDocument Path:          /server/route/\r\nDocument Length:        22 bytes\r\n\r\nConcurrency Level:      150\r\nTime taken for tests:   29.206 seconds\r\nComplete requests:      10000\r\nFailed requests:        0\r\nTotal transferred:      1200000 bytes\r\nHTML transferred:       220000 bytes\r\nRequests per second:    342.39 [#/sec] (mean)\r\nTime per request:       438.094 [ms] (mean)\r\nTime per request:       2.921 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          40.12 [Kbytes/sec] received\r\n\r\nConnection Times (ms)\r\n              min  mean[+/-sd] median   max\r\nConnect:        0    0   0.6      0       7\r\nProcessing:   252  436  61.5    431     784\r\nWaiting:      213  398  61.4    393     744\r\nTotal:        252  436  61.5    431     788\r\n\r\nPercentage of the requests served within a certain time (ms)\r\n  50%    431\r\n  66%    456\r\n  75%    475\r\n  80%    484\r\n  90%    516\r\n  95%    540\r\n  98%    572\r\n  99%    596\r\n 100%    788 (longest request)\r\n\r\n\r\n\r\n\r\n\r\n"}}