March-hare / MarchHare-Mobile

Other
4 stars 0 forks source link

Decrease url granularity for polling for new incidents #26

Open evoltech opened 12 years ago

evoltech commented 12 years ago

The url generated tor polling for new reports from the Ushahidi API is now per second. If we get a lot of clients polling, even if there is a short poll frequency it will be hard to cache the response in the forward proxy.

This issue may be handled by some intelligent configuration of the forward proxy (ie all requests for /api/?task=decayimage&by=sincedate&date= and the proxy never makes back-end requests, but only allows invalidations from the Ushahidi master). Without limiting the API cache to only serving explicitly invalidated caches we could also make sure that has a max resolution of a minute instead of second. This would change the worst case scenario from n back-end requests per second to 1 back-end request per minute to cache API requests.