Announcing the upstream status module

This module provides a handler called upstream_status that can be used
as follows:

location /foo {
upstream_status;
}

It reports all the upstream blocks configured for this server. For
upstreams managed using the round robin (default upstream), it lists all
the backends configured in a block and indicates the current status
(up/down)

Improvements are welcome.

Hello!

On Mon, Apr 12, 2010 at 10:18:33PM +0530, Arvind Jayaprakash wrote:

the backends configured in a block and indicates the current status
(up/down)

http://github.com/anomalizer/ngx_upstream_status

Improvements are welcome.

Most important improvement is to document that it actually shows
configuration and status of upstreams in one particular worker
process which status request happened to hit.

And, uhm, number of allocs you use to produce simple answer is
really outstanding. :wink:

Maxim D.

Maxim D. at 2010-4-13 2:25 wrote:

}
Improvements are welcome.

Most important improvement is to document that it actually shows
configuration and status of upstreams in one particular worker
process which status request happened to hit.

The only method of showing all the status is using the shared memory,
but is it worth of that?


Weibin Y.

On Apr 12, Maxim D. wrote:

Most important improvement is to document that it actually shows
configuration and status of upstreams in one particular worker
process which status request happened to hit.

Done. I did not realize this until pointed it out but it now seems
obvious.

And, uhm, number of allocs you use to produce simple answer is
really outstanding. :wink:

I completely hated it during the development. If there is an equivalent
of asprinf() in the nginx API, or a better way, do let me know.

Hello!

On Tue, Apr 13, 2010 at 10:12:12AM +0800, Weibin Y. wrote:

}
Improvements are welcome.

Most important improvement is to document that it actually shows
configuration and status of upstreams in one particular worker
process which status request happened to hit.

The only method of showing all the status is using the shared
memory, but is it worth of that?

I’m not suggesting to re-implement how upstreams are stored in
nginx. I’m suggesting to document what this particular module
shows.

Maxim D.

Hello!

On Tue, Apr 13, 2010 at 11:26:04PM +0530, Arvind Jayaprakash wrote:

}
Improvements are welcome.

I completely hated it during the development. If there is an equivalent
of asprinf() in the nginx API, or a better way, do let me know.

Usual aproach is to count needed buffer size, allocate buffer, and
then print. See stub status module for an example.

Maxim D.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs