# Strange cookie behavior using HttpUserIdModule

**URL:** <https://www.ruby-forum.com/t/strange-cookie-behavior-using-httpuseridmodule/198218>\
**Category:** NGINX\
**Created:** [October 28, 2010, 1:35am UTC](https://www.ruby-forum.com/t/strange-cookie-behavior-using-httpuseridmodule/198218 "2010-10-28T01:35:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [October 28, 2010, 1:35am UTC](https://www.ruby-forum.com/t/strange-cookie-behavior-using-httpuseridmodule/198218/1 "2010-10-28T01:35:13Z")

</div>

Hey all,

I’m seeing a strange behavior using the HttpUserIdModule. I am seeing  
significantly more set operations that I would expect. The ratio of  
about 50% sets to 50% gets remains constant regardless of the days  
covered. So, if I include 1 day then percentage is the same as if I  
include several days.

The usage pattern of the clients and the sheer volume of users would  
indicate that we would not see 50% day after day.

So, on to specifics:

Configuration

userid on;  
userid\_name uid;  
userid\_domain [xyz.com](http://xyz.com);  
userid\_path /;  
userid\_expires 365d;  
userid\_p3p ‘policyref=“/w3c/p3p.xml”, CP=“CUR ADM OUR NOR  
STA NID”’;

Requests flow in from

Client → DNS load balance → HA load balance → 1 of 6 nginx servers

HA load balance is HAProxy.

There are 6 identically configured servers that accept requests. We are  
sending the cookie as a 3rd party cookie - i.e. the cookie comes because  
of a javascript on [zxc.com](http://zxc.com) which requests something from [xyz.com](http://xyz.com) (our  
site).

I am trying to figure out if this is a user agent not respecting the  
cookie or something else.

Has anyone seen strange results utilizing this setup?

Thanks!

---

<div class="post-metadata">

**Author:** ![vanderkerkoff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/7feea3/32.png) [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Post date:** [August 24, 2011, 3:11pm UTC](https://www.ruby-forum.com/t/strange-cookie-behavior-using-httpuseridmodule/198218/2 "2011-08-24T15:11:53Z")

</div>

Hi Matt

Long time since this thread hit a dead end, but interested to know if  
you ever resolved it. Seeing a similar problem.

Thanks

Simon

Posted at Nginx Forum:

> **[Re: Strange cookie behavior using HttpUserIdModule](https://forum.nginx.org/read.php?2,145126,214254#msg-214254)**
>
> Hey all, I'm seeing a strange behavior using the HttpUserIdModule. I am seeing significantly more set operations that I would expect. The ratio of about 50% sets to 50% gets remains constant regardless of the days covered. So, if I include 1 day then...
