# Nginx http poller module

**URL:** <https://www.ruby-forum.com/t/nginx-http-poller-module/228624>\
**Category:** NGINX\
**Created:** [April 30, 2013, 6:46pm UTC](https://www.ruby-forum.com/t/nginx-http-poller-module/228624 "2013-04-30T18:46:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Bailey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/858c86/32.png) [@Dave\_Bailey](https://www.ruby-forum.com/u/Dave_Bailey)\
**Post date:** [April 30, 2013, 6:46pm UTC](https://www.ruby-forum.com/t/nginx-http-poller-module/228624/1 "2013-04-30T18:46:15Z")

</div>

Hi,

I’ve written an nginx module that allows the user to configure nginx  
worker  
processes to make detached, repeated “polling” HTTP requests. The  
request  
endpoint, method, URI, headers, and body are configurable, and it’s also  
possible to register a set of callbacks to process the response status  
line, headers, body, and finalization. The idea is that if you have a  
multiple-worker setup, it may sometimes be useful to have each worker  
polling some service with its own status, or to request dynamic  
configuration updates, etc. In some scenarios, this may be a desirable  
alternative to using shared memory to synchronize state between workers.

Module source:

> **[GitHub - dbcode/nginx-poller-module: Flexible detached polling requests for...](https://github.com/dbcode/nginx-poller-module)**
>
> Flexible detached polling requests for nginx workers - GitHub - dbcode/nginx-poller-module: Flexible detached polling requests for nginx workers

Example configuration (the README has more details):

http {  
poller config {  
endpoint [http://config](http://config);  
method GET;  
header Host config;  
header User-Agent nginx;  
uri $my\_config\_uri;  
interval $my\_config\_interval;  
}  
}

Thanks to Piotr S. for ngx\_supervisord, which showed how to build  
the  
detached request without an incoming connection.

-dave
