mapbox / mapbox/tilelive

Overhead of tilelive compared to pure node-mapnik for tile serving

Open
#12 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
540
Forks
106
PR merge metrics
No merged PRs in 30d

Description

I'm seeing a 15-20 r/s overhead of the tilelive rendering approach. Some overhead is to be expected given the needed dynamic nature of the tilelive.Tile constructor, but we should ideally look to reduce this overhead.

(I am using node 0.2.6 + all dependencies installed using npm based on the tilelive package.json)

To replicate install node-mapnik master and tilelive master.

Then go into the node-mapnik checkout:

cd node-mapnik/examples/

Launch the simple node-mapnik server:

./tile/pool/app.js ./stylesheet.xml 8000

Benchmark a tile in apache bench:

ab -n 500 -c 150 "http://127.0.0.1:8000/1/1/0.png"
#I get: Requests per second:    93.45 [#/sec] (mean)

Then launch the tilelive server:

./tile/tilelive/app.js ./stylesheet.xml 8000

Benchmark a tile in apache bench:

ab -n 500 -c 150 "http://127.0.0.1:8000/1/1/0.png"
#I get: Requests per second:    70.94 [#/sec] (mean)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the comparison using node-mapnik/examples/tile/pool/app.js and node-mapnik/examples/tile/tilelive/app.js, following the listed apache bench commands. Read the tilelive server path and its Tile constructor usage first, then identify where the per-request overhead occurs. Done means the tilelive benchmark shows a reduced gap against the pure node-mapnik server.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.