-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update project to use most recent version of Windshaft #116
Conversation
e6d4430
to
db102ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done. I did not find any regressions in tiler behavior.
I recorded a session of me zooming into an ~50,000 tree instance using gatling.
I don't see any significant change in the performance (a good thing).
3 runs using the previous version of the tiler
================================================================================
---- Global Information --------------------------------------------------------
> request count 2360 (OK=2360 KO=0 )
> min response time 2 (OK=2 KO=- )
> max response time 25307 (OK=25307 KO=- )
> mean response time 307 (OK=307 KO=- )
> std deviation 578 (OK=578 KO=- )
> response time 50th percentile 221 (OK=221 KO=- )
> response time 75th percentile 405 (OK=405 KO=- )
> response time 95th percentile 853 (OK=853 KO=- )
> response time 99th percentile 1205 (OK=1205 KO=- )
> mean requests/sec 37.46 (OK=37.46 KO=- )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 2217 ( 94%)
> 800 ms < t < 1200 ms 118 ( 5%)
> t > 1200 ms 25 ( 1%)
> failed 0 ( 0%)
================================================================================
================================================================================
---- Global Information --------------------------------------------------------
> request count 2360 (OK=2360 KO=0 )
> min response time 4 (OK=4 KO=- )
> max response time 25140 (OK=25140 KO=- )
> mean response time 384 (OK=384 KO=- )
> std deviation 662 (OK=662 KO=- )
> response time 50th percentile 208 (OK=207 KO=- )
> response time 75th percentile 468 (OK=468 KO=- )
> response time 95th percentile 1437 (OK=1437 KO=- )
> response time 99th percentile 1783 (OK=1783 KO=- )
> mean requests/sec 36.308 (OK=36.308 KO=- )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 2022 ( 86%)
> 800 ms < t < 1200 ms 176 ( 7%)
> t > 1200 ms 162 ( 7%)
> failed 0 ( 0%)
================================================================================
================================================================================
---- Global Information --------------------------------------------------------
> request count 2360 (OK=2360 KO=0 )
> min response time 1 (OK=1 KO=- )
> max response time 25458 (OK=25458 KO=- )
> mean response time 303 (OK=303 KO=- )
> std deviation 580 (OK=580 KO=- )
> response time 50th percentile 212 (OK=212 KO=- )
> response time 75th percentile 428 (OK=429 KO=- )
> response time 95th percentile 853 (OK=853 KO=- )
> response time 99th percentile 1176 (OK=1176 KO=- )
> mean requests/sec 38.689 (OK=38.689 KO=- )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 2237 ( 95%)
> 800 ms < t < 1200 ms 104 ( 4%)
> t > 1200 ms 19 ( 1%)
> failed 0 ( 0%)
================================================================================
3 runs of the new tiler
================================================================================
---- Global Information --------------------------------------------------------
> request count 2360 (OK=2360 KO=0 )
> min response time 2 (OK=2 KO=- )
> max response time 25477 (OK=25477 KO=- )
> mean response time 462 (OK=462 KO=- )
> std deviation 650 (OK=650 KO=- )
> response time 50th percentile 304 (OK=304 KO=- )
> response time 75th percentile 683 (OK=683 KO=- )
> response time 95th percentile 1229 (OK=1229 KO=- )
> response time 99th percentile 1822 (OK=1822 KO=- )
> mean requests/sec 36.875 (OK=36.875 KO=- )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 1925 ( 82%)
> 800 ms < t < 1200 ms 304 ( 13%)
> t > 1200 ms 131 ( 6%)
> failed 0 ( 0%)
================================================================================
================================================================================
---- Global Information --------------------------------------------------------
> request count 2360 (OK=2360 KO=0 )
> min response time 2 (OK=2 KO=- )
> max response time 26253 (OK=26253 KO=- )
> mean response time 593 (OK=593 KO=- )
> std deviation 700 (OK=700 KO=- )
> response time 50th percentile 389 (OK=389 KO=- )
> response time 75th percentile 866 (OK=866 KO=- )
> response time 95th percentile 1500 (OK=1500 KO=- )
> response time 99th percentile 1873 (OK=1873 KO=- )
> mean requests/sec 35.758 (OK=35.758 KO=- )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 1734 ( 73%)
> 800 ms < t < 1200 ms 315 ( 13%)
> t > 1200 ms 311 ( 13%)
> failed 0 ( 0%)
================================================================================
================================================================================
---- Global Information --------------------------------------------------------
> request count 2360 (OK=2360 KO=0 )
> min response time 2 (OK=2 KO=- )
> max response time 25952 (OK=25952 KO=- )
> mean response time 392 (OK=392 KO=- )
> std deviation 605 (OK=605 KO=- )
> response time 50th percentile 273 (OK=273 KO=- )
> response time 75th percentile 575 (OK=575 KO=- )
> response time 95th percentile 973 (OK=973 KO=- )
> response time 99th percentile 1330 (OK=1330 KO=- )
> mean requests/sec 38.689 (OK=38.689 KO=- )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 2104 ( 89%)
> 800 ms < t < 1200 ms 211 ( 9%)
> t > 1200 ms 45 ( 2%)
> failed 0 ( 0%)
===============================================================================
http/windshaftServer.js
Outdated
|
||
// simple testable route | ||
app.get('/', function(req, res) { | ||
res.send('This is an example HTTP server using windshaft library'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like "OpenTreeMap Tile Server" may be a more appropriate response here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just going to remove this route entirely, it doesn't serve any purpose for us.
db102ea
to
dd07af6
Compare
Most of the changes are in the `http/` directory, which attempts to provide a facade of the former API to make the changes required in the rest of the project minimal. This was heavily cribbed from an Windshaft example server: https://github.com/CartoDB/Windshaft/blob/50897ad/examples/http/server.js Other changes include: - Switching from using npm to yarn, with an accompanying yarn.lock instead of the previously used npm-shrinkwrap.json - Updated Rollbar to the latest version, which required minimal changes - Updated Underscore, which required some minimal changes - Fixing the healthCheck to directly use dependencies instead "reaching into" Windshaft. As yarn places dependencies in the top-level 'node_modules/' whenever possible, we are still effectively using the same code as Windshaft - Removing parentheses on outermost SQL queries - these are now added by Windshaft - Updating the watch script to enable the debugging with the Chrome dev tools - Support for statsd was removed from Windshaft, so I have removed it from our configuration in server.js as well Connects to OpenTreeMap#47
dd07af6
to
12eb77c
Compare
Previously Windshaft included a built-in server. That must now be specified explicitly, as done in OpenTreeMap/otm-tiler#116, and as shown in their examples https://github.com/CartoDB/Windshaft/tree/be55cb931a157be3e7da9e9c810929f48c342789/examples The beforeTileRender and afterTileRender hooks are gone, so that functionality is moved in to the server code. Some of this code has been updated / adapted from the examples to make more sense, and be less redundant. Other parts remain from the examples. It could use a proper overhaul.
Most of the changes are in the
http/
directory, which attempts to providea facade of the former API to make the changes required in the rest of the
project minimal. This was heavily cribbed from an Windshaft example server:
https://github.com/CartoDB/Windshaft/blob/50897ad/examples/http/server.js
Other changes include:
the previously used npm-shrinkwrap.json
Windshaft. As yarn places dependencies in the top-level 'node_modules/'
whenever possible, we are still effectively using the same code as Windshaft
our configuration in server.js as well
Connects to #47