# Sticky equivalent

**URL:** <https://www.ruby-forum.com/t/sticky-equivalent/230445>\
**Category:** NGINX\
**Created:** [June 18, 2014, 12:24pm UTC](https://www.ruby-forum.com/t/sticky-equivalent/230445 "2014-06-18T12:24:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@jason\_sam](https://www.ruby-forum.com/u/jason_sam)\
**Post date:** [June 18, 2014, 12:24pm UTC](https://www.ruby-forum.com/t/sticky-equivalent/230445/1 "2014-06-18T12:24:56Z")

</div>

Hi guys,

I am running nginx 1.4 right now on a bunch of front end servers, i am  
running freebsd, and have nginx with sticky patch compiled from ports.

I can’t upgrade to 1.6 or later, because the sticky port seems to be  
broken. Was there any similar feature introduced in nginx, or how can we  
work that one out?

Regards  
Rares

---

<div class="post-metadata">

**Author:** ![Stefanita\_Rares\_Dum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Stefanita\_Rares\_Dum](https://www.ruby-forum.com/u/Stefanita_Rares_Dum)\
**Post date:** [June 18, 2014, 12:59pm UTC](https://www.ruby-forum.com/t/sticky-equivalent/230445/2 "2014-06-18T12:59:22Z")

</div>

On Wed, Jun 18, 2014 at 12:24:32PM +0200, Stefanita Rares Dumitrescu  
wrote:

> Hi guys,
> 
> I am running nginx 1.4 right now on a bunch of front end servers, i am  
> running freebsd, and have nginx with sticky patch compiled from ports.
> 
> I can’t upgrade to 1.6 or later, because the sticky port seems to be  
> broken. Was there any similar feature introduced in nginx, or how can we  
> work that one out?

The latest version of nginx 1.7.2 includes the consistent hash feature  
[1].  
The commercial version of nginx includes the sticky functionality [2].

[1] [Module ngx\_http\_upstream\_module](http://nginx.org/r/hash)  
[2] [Module ngx\_http\_upstream\_module](http://nginx.org/r/sticky)

---

<div class="post-metadata">

**Author:** ![Stefanita\_Rares\_Dum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Stefanita\_Rares\_Dum](https://www.ruby-forum.com/u/Stefanita_Rares_Dum)\
**Post date:** [June 18, 2014, 4:23pm UTC](https://www.ruby-forum.com/t/sticky-equivalent/230445/3 "2014-06-18T16:23:11Z")

</div>

Dear Ruslan,

Can you post an example of using this hash feature?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Stefanita\_Rares\_Dum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Stefanita\_Rares\_Dum](https://www.ruby-forum.com/u/Stefanita_Rares_Dum)\
**Post date:** [June 18, 2014, 4:49pm UTC](https://www.ruby-forum.com/t/sticky-equivalent/230445/4 "2014-06-18T16:49:57Z")

</div>

On Wed, Jun 18, 2014 at 11:22:24AM -0300, Fabiano Furtado Pessoa Coelho  
wrote:

> Dear Ruslan,
> 
> Can you post an example of using this hash feature?
> 
> Thanks in advance.

```
upstream u {
 hash $binary_remote_addr consistent;

```

server 10.0.0.1;  
server 10.0.0.2;  
server 10.0.0.3;  
}

You can use any expression as the “key”, e.g.

hash $cookie\_uid consistent;

It all depends on your needs actually.

---

<div class="post-metadata">

**Author:** ![Stefanita\_Rares\_Dum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Stefanita\_Rares\_Dum](https://www.ruby-forum.com/u/Stefanita_Rares_Dum)\
**Post date:** [June 18, 2014, 11:09pm UTC](https://www.ruby-forum.com/t/sticky-equivalent/230445/5 "2014-06-18T23:09:33Z")

</div>

On Wed, Jun 18, 2014 at 08:46:04PM +0200, Stefanita Rares Dumitrescu  
wrote:

> Oh god 1350$

Consistent hash is free of charge, it’s in open source version.

> > server 10.0.0.2;
> > 
> > > > On Wed, Jun 18, 2014 at 12:24:32PM +0200, Stefanita Rares Dumitrescu wrote:
> 
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
Ruslan E.

---

<div class="post-metadata">

**Author:** ![Stefanita\_Rares\_Dum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Stefanita\_Rares\_Dum](https://www.ruby-forum.com/u/Stefanita_Rares_Dum)\
**Post date:** [June 18, 2014, 8:47pm UTC](https://www.ruby-forum.com/t/sticky-equivalent/230445/6 "2014-06-18T20:47:01Z")

</div>

Oh god 1350$

---

<div class="post-metadata">

**Author:** ![Stefanita\_Rares\_Dum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Stefanita\_Rares\_Dum](https://www.ruby-forum.com/u/Stefanita_Rares_Dum)\
**Post date:** [June 19, 2014, 9:47am UTC](https://www.ruby-forum.com/t/sticky-equivalent/230445/7 "2014-06-19T09:47:19Z")

</div>

Am 18-06-2014 20:46, schrieb Stefanita Rares Dumitrescu:

> Oh god 1350$

Per year.

It’s cheap compared to some other commercial Servers, from my point of  
view.

---

<div class="post-metadata">

**Author:** ![Stefanita\_Rares\_Dum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Stefanita\_Rares\_Dum](https://www.ruby-forum.com/u/Stefanita_Rares_Dum)\
**Post date:** [June 20, 2014, 7:11am UTC](https://www.ruby-forum.com/t/sticky-equivalent/230445/8 "2014-06-20T07:11:33Z")

</div>

On Thu, Jun 19, 2014 at 9:46 AM, Aleksandar L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 

​… and it is expensive compared to the open-source Apache.​

​nginx as FOSS is great.  
nginx Plus is worth as much as other commercial/closed-source  
products.​..

Well.  
The ‘sticky’ property is out of scope of this ML since not part of the  
FOSS  
nginx.  
End of discussion.

## The docs are already polluted with mentions of the commercial product since, surprisingly, nginx Plus docs have not been separated from nginx FOSS ones. On a personal stance, I would like not to see this ML polluted with discussions on nginx Plus. ​

_B. R._

---

<div class="post-metadata">

**Author:** ![Stefanita\_Rares\_Dum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Stefanita\_Rares\_Dum](https://www.ruby-forum.com/u/Stefanita_Rares_Dum)\
**Post date:** [June 20, 2014, 2:08pm UTC](https://www.ruby-forum.com/t/sticky-equivalent/230445/9 "2014-06-20T14:08:27Z")

</div>

Dear B. R.

> Am 20-06-2014 07:10, schrieb B.R.:

> > On Thu, Jun 19, 2014 at 9:46 AM, Aleksandar L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > wrote:
> > 
> > > Am 18-06-2014 20:46, schrieb Stefanita Rares Dumitrescu:  
> > > Oh god 1350$
> > 
> > Per year.
> > 
> > It’s cheap compared to some other commercial Servers, from my point of  
> > view.

> ​ … and it is expensive compared to the open-source Apache.​

No comment.

​\> nginx as FOSS is great.

Full Ack.

> nginx Plus is worth as much as other commercial/closed-source  
> products.​..

On this point we have different opinions.

> Well.  
> The ‘sticky’ property is out of scope of this ML since not part of the  
> FOSS nginx.

I haven’t seen in the past such a separation, but it’s ok for me , if  
the ML-Moderators want this.

[http://nginx.org/en/support.html](http://nginx.org/en/support.html)

> End of discussion.

It’s up to you and every other ML participant to answer to a post on the  
ML or not.

Command not acknowledge.

Well, I’m with you that the price discussion is here wrong.

> The docs are already polluted with mentions of the commercial product  
> since, surprisingly,  
> nginx Plus docs have not been separated from nginx FOSS ones.

I like to know which features are available on a SW even in the  
commercial one.  
That’s my point of view, of course yours could be another one.

> On a personal stance, I would like not to see this ML polluted with  
> discussions on nginx Plus.

But may be other?  
In the past I haven’t seen to much such discussions on this ML.

> B. R.

Cheers  
Aleks
