Welcome! Log In Create A New Profile


Atomic counters with nginx

July 31, 2009 10:50AM
I need to implement some atomic counters (where the counter is persistent across server reboots/crashes) to scale to lots of hits per second to update the counter as GET requests to a web available global server. I need these counters to have fairly low latency. Since I already use nginx as my web server, I was thinking it might be the best place to implement this web service.

Basically, I want to issue a single GET request to an nginx server and increment and retrieve the new value of several 64-bit counters. The single GET request needs to handle incrementing several distinct counters (to reduce overhead) and restrict the request from a list of requesting IPs and a password (or some other secure method to prevent a server other than my servers from updating the counters).

Is there an existing module that I can implement something like this? Or, would someone consider writing such a module?

I need the counters to be atomic since I am using them as unique global indices in my local databases. I think such a module would have general appeal since many people might like to keep page counters for their web pages (and this module could be written to support this too).

Hopefully, atomic counters are already implemented, but I couldn't find it in a search.

Edited 1 time(s). Last edit at 07/31/2009 10:53AM by ktwalrus.
Subject Author Posted

Atomic counters with nginx

ktwalrus July 31, 2009 10:50AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 46
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready