Welcome! Log In Create A New Profile

Advanced

Re: Enquiry regarding Sticky Module's hash functions

All files from this thread

File Name File Size   Posted by Date  
1.9 KB open | download Stephan Wolfauer 06/16/2011 Read message
1.1 KB open | download Stephan Wolfauer 06/16/2011 Read message
1.9 KB open | download Dalibor Jotanovic 06/16/2011 Read message
1.1 KB open | download Dalibor Jotanovic 06/16/2011 Read message
1.9 KB open | download Dalibor Jotanovic 06/16/2011 Read message
1.1 KB open | download Dalibor Jotanovic 06/16/2011 Read message
1.9 KB open | download Dalibor Jotanovic 06/16/2011 Read message
1.1 KB open | download Dalibor Jotanovic 06/16/2011 Read message
1.9 KB open | download Dalibor Jotanovic 06/16/2011 Read message
1.1 KB open | download Dalibor Jotanovic 06/16/2011 Read message
Jérôme Loyet
October 06, 2011 12:40PM
2011/10/6 ramindeja <nginx-forum@nginx.us>
>
> Hi,

Hi,

>
> We are using NGINX as a load-balancer and we would like to learn more
> about the MD5 hash function. We need to replicate this function in our
> Java application.
>
> We are using the sticky module that hashes the IP.

Are you talking of this module: http://code.google.com/p/nginx-sticky-module/ ?

> When we tried to hash
> the same IP:PORT using MD5 in Java , we never got the same result. What
> inputs should we use for the MD5 function.

If you are using nginx-sticky-module, you won't be able to recreate
the same MD5 easily because the module uses internal nginx data to
create the hash.
You can look in ngx_http_sticky_module.c on line 146
(http://code.google.com/p/nginx-sticky-module/source/browse/trunk/ngx_http_sticky_module.c#146).
You'll find out that the md5 hash is made from the sockaddr internal
structure which discribe each backend server and I'm not sure you'll
be able to reconstruct the very same structure on your java side.

what is your need ? there is maybe another way to achieve your goal.

++ jerome

>
> Thanks in advance,
> RaminDeja
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,207455,216324#msg-216324
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx sticky module compile error Attachments

Stephan Wolfauer June 16, 2011 03:58AM

Re: nginx sticky module compile error

Maxim Dounin June 16, 2011 04:00AM

Antw: Re: nginx sticky module compile error Attachments

Dalibor Jotanovic June 16, 2011 04:34AM

Re: Antw: Re: nginx sticky module compile error

Maxim Dounin June 16, 2011 05:46AM

Re: Antw: Re: nginx sticky module compile error Attachments

Dalibor Jotanovic June 16, 2011 06:02AM

Re: Antw: Re: nginx sticky module compile error

Maxim Dounin June 16, 2011 06:18AM

Re: Antw: Re: nginx sticky module compile error Attachments

Dalibor Jotanovic June 16, 2011 07:00AM

Re: Antw: Re: nginx sticky module compile error Attachments

Dalibor Jotanovic June 16, 2011 07:22AM

Re: Antw: Re: nginx sticky module compile error

Jérôme Loyet June 16, 2011 02:30PM

Re: Antw: Re: nginx sticky module compile error

Maxim Dounin June 16, 2011 03:48PM

Enquiry regarding Sticky Module's hash functions

ramindeja October 06, 2011 12:31PM

Re: Enquiry regarding Sticky Module's hash functions

Jérôme Loyet October 06, 2011 12:40PM

Re: Enquiry regarding Sticky Module's hash functions

ramindeja October 06, 2011 04:37PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 69
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