Re:Costs of running a Python webapp for 55k monthly users
by yread on Friday September 04, 2020 @06:16AM
(#24373579)
What's blocking is number of http connections between browser and server. Most browsers only allow 6, each tile takes about 100ms so getting 10 in under second doesn't always happen.
[ Parent
| on HN ]
Re:Costs of running a Python webapp for 55k monthly users
by mping on Friday September 04, 2020 @10:11AM
(#24375056)
But this itself wouldn't cause the "struggling" you mention with more than 2 concurrent users per core
Re:Costs of running a Python webapp for 55k monthly users
by durkie on Friday September 04, 2020 @07:48AM
(#24374073)
Do you know if the old open street map trick of having multiple tile servers (that are each just aliases of the same server) still works? I think this was how they tried circumventing the 6 connection limit
Re:Costs of running a Python webapp for 55k monthly users
by NavinF on Saturday September 05, 2020 @04:08PM
(#24386504)
That's no longer necessary thanks to HTTP/2
Your webserver still has to spin off a thread for each request if you want to do substantial CPU work for each request, but rest assured you'll get all the requests at once from the browser. Not 6 at a time like in the dark ages
The RFC recommends at least 100 streams. See SETTINGS_MAX_CONCURRENT_STREAMS https://tools.ietf.org/html/rfc7540#section-6.5.2
Re:Costs of running a Python webapp for 55k monthly users
by brendawalsh on Friday September 04, 2020 @06:48AM
(#24373764)
Have you tried combining the tiles on-the-fly as image sprites?
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Images/...