Develop a simple nginx module to count received http requests for each IP address

Ukończone Opublikowano Jan 7, 2016 Płatność przy odbiorze
Ukończone Płatność przy odbiorze

I need a simple nginx module to be developed

The module will need to accomplish a simple task:

Counting the number of http requests that an IP address does to a website

The requirement is to have available in nginx a new variable:

$remote_addr_request_count_today

It should count the requests filtering them on daily basis

E.g. when IP 1.1.1.1 makes the first HTTP request you'll have:

$remote_addr_request_count_today=0

second request:

$remote_addr_request_count_today=1

and so on...

now imagine you'll end in this at the end of the day:

$remote_addr_request_count_today=250

But at midnight, or the next day the count will be reset to 0 (you can implement this simply storing the IP+date as an hash in your storage for the counter stats

As storage you can use simple flat file writing, SQLite, memcached, mysql or redis (up to you, pick the simpler, flat file should be good enough but needs to be optimized coding to read/write it, to avoid bottlenecks and cuncurrency issues when there's much traffic.

Note: nginx modules are written in C, see here for an example to start, it's a module already working on IP addresses and creating new variables, so this example is very good as a starting point for your work: [login to view URL]

Programowanie C Nginx

Numer ID Projektu: #9257343

O projekcie

4 ofert Zdalny projekt Aktywny Jan 8, 2016

Przyznany użytkownikowi:

laoavx

Hi, I have a lot experience in C programming under Linux. I can make this project with best quality and just in time. Regards, Alexander

€69 EUR w ciągu 3 dni
(9 ocen)
3.9

4 freelancerów złożyło ofertę za €94 w tym projekcie

GabrielSoare

Hello, I have experience with stuff like this, I have implemented something similar for apache. (I didn't work very much with nginx)

€118 EUR w ciągu 2 dni
(4 Oceny)
3.6
bookshop1989

A proposal has not yet been provided

€89 EUR w ciągu 3 dni
(4 Oceny)
2.2
anamaria1979

Propunerea nu a fost încă furnizată

€98 EUR w ciągu 0 dni
(0 Oceny)
0.0