# HA cookie-based routing in the cloud

**URL:** <https://www.ruby-forum.com/t/ha-cookie-based-routing-in-the-cloud/216565>\
**Category:** NGINX\
**Created:** [February 8, 2012, 2:04am UTC](https://www.ruby-forum.com/t/ha-cookie-based-routing-in-the-cloud/216565 "2012-02-08T02:04:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 8, 2012, 2:04am UTC](https://www.ruby-forum.com/t/ha-cookie-based-routing-in-the-cloud/216565/1 "2012-02-08T02:04:04Z")

</div>

We are looking for a solution for “sticky bit routing” based on cookies  
that will run on Amazon’s EC2 cloud.

I’ve looked at the sticky module (although not the source yet) and it  
~may~ be capable of doing what we need, but I thought I’d ask the forum  
to see if anyone else has already tried this solution. (Without knowing  
the implementation, it’s impossible to say if our requirements can be  
met by the sticky module)

The challenge that we have is that unlike a traditional system where the  
sticky bit routing would be to one of a set of predefined servers, in  
our case, the servers will be created dynamically in the cloud. We can’t  
“configure” them when we start the nginx routing layer. Although we may  
have some “back up” servers, that can be used if no cookie is in the  
request OR if the cookie specifies a server that has died, in general  
the servers that the cookie will be specifying will be dynamically  
created and we will assign them to the requests “ourselves” (not needing  
the nginx layer to round-robin assign them to one of a pool of fixed  
address servers).

So my question may come down to: “Can the sticky module route to servers  
not predefined in the initial configuration”? I can easily imagine an  
implementation that could handle this, but wanted to ask if the sticky  
module already does this.

Thanks in advance

– Langley

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,222088,222088#msg-222088](http://forum.nginx.org/read.php?2,222088,222088#msg-222088)

---

<div class="post-metadata">

**Author:** ![Langley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ce7236/32.png) [@Langley](https://www.ruby-forum.com/u/Langley)\
**Post date:** [February 8, 2012, 6:04pm UTC](https://www.ruby-forum.com/t/ha-cookie-based-routing-in-the-cloud/216565/2 "2012-02-08T18:04:05Z")

</div>

Is this the right forum to ask questions about the nginx-sticky-module?  
I checked here: [Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/nginx-sticky-module/) and didn’t  
see any mailing list, forum or google group.

TIA

– Langley

Posted at Nginx Forum:

> **[Re: HA cookie-based routing in the cloud](https://forum.nginx.org/read.php?2,222088,222120#msg-222120)**
>
> We are looking for a solution for "sticky bit routing" based on cookies that will run on Amazon's EC2 cloud. I've looked at the sticky module (although not the source yet) and it ~may~ be capable of doing what we need, but I thought I'd ask...

---

<div class="post-metadata">

**Author:** ![Langley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ce7236/32.png) [@Langley](https://www.ruby-forum.com/u/Langley)\
**Post date:** [February 9, 2012, 4:07am UTC](https://www.ruby-forum.com/t/ha-cookie-based-routing-in-the-cloud/216565/3 "2012-02-09T04:07:23Z")

</div>

[http://notmysock.org/blog/hacks/haproxy-user-repinning.html](http://notmysock.org/blog/hacks/haproxy-user-repinning.html)
