Re: [nodejs] Re: Sticky sessions using the new cluster API?

2013-03-03 Thread Tim Dickinson
I read in the docs some place. I cant seems to find it again. Can anyone say 
anything about where information might be on this?

On Tuesday, June 26, 2012 10:54:04 PM UTC-4, Dominic wrote:
> I understand that the cluster api works by passing a file descriptor
> 
> to the worker process.
> 
> 
> 
> is it possible pass a file descriptor after you have started reading from it?
> 
> 
> 
> On Wed, Jun 27, 2012 at 9:30 AM, Isaac Schlueter  wrote:
> 
> > For sessions, I recommend using redis with redsess:
> 
> > https://github.com/isaacs/redsess
> 
> >
> 
> > On Tue, Jun 26, 2012 at 7:58 AM, Bradley Meck  
> > wrote:
> 
> >> +1 for not including this, sticky sessions are painful when they become the
> 
> >> least common denominator.
> 
> >>
> 
> >>
> 
> >> On Tuesday, June 26, 2012 8:48:00 AM UTC-5, Ben Noordhuis wrote:
> 
> >>>
> 
> >>> On Tue, Jun 26, 2012 at 6:02 AM, dhruvbird  wrote:
> 
> >>> > Just saw the blog post introducing 0.8 and it seems that it's a
> 
> >>> > conscious
> 
> >>> > decision to leave sticky sessions out.
> 
> >>>
> 
> >>> That's correct.
> 
> >>
> 
> >> --
> 
> >> Job Board: http://jobs.nodejs.org/
> 
> >> Posting guidelines:
> 
> >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> 
> >> You received this message because you are subscribed to the Google
> 
> >> Groups "nodejs" group.
> 
> >> To post to this group, send email to nodejs@googlegroups.com
> 
> >> To unsubscribe from this group, send email to
> 
> >> nodejs+unsubscr...@googlegroups.com
> 
> >> For more options, visit this group at
> 
> >> http://groups.google.com/group/nodejs?hl=en?hl=en
> 
> >
> 
> > --
> 
> > Job Board: http://jobs.nodejs.org/
> 
> > Posting guidelines: 
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> 
> > You received this message because you are subscribed to the Google
> 
> > Groups "nodejs" group.
> 
> > To post to this group, send email to nodejs@googlegroups.com
> 
> > To unsubscribe from this group, send email to
> 
> > nodejs+unsubscr...@googlegroups.com
> 
> > For more options, visit this group at
> 
> > http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [nodejs] Re: Sticky sessions using the new cluster API?

2012-06-26 Thread Dominic Tarr
I understand that the cluster api works by passing a file descriptor
to the worker process.

is it possible pass a file descriptor after you have started reading from it?

On Wed, Jun 27, 2012 at 9:30 AM, Isaac Schlueter  wrote:
> For sessions, I recommend using redis with redsess:
> https://github.com/isaacs/redsess
>
> On Tue, Jun 26, 2012 at 7:58 AM, Bradley Meck  wrote:
>> +1 for not including this, sticky sessions are painful when they become the
>> least common denominator.
>>
>>
>> On Tuesday, June 26, 2012 8:48:00 AM UTC-5, Ben Noordhuis wrote:
>>>
>>> On Tue, Jun 26, 2012 at 6:02 AM, dhruvbird  wrote:
>>> > Just saw the blog post introducing 0.8 and it seems that it's a
>>> > conscious
>>> > decision to leave sticky sessions out.
>>>
>>> That's correct.
>>
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Sticky sessions using the new cluster API?

2012-06-26 Thread Isaac Schlueter
For sessions, I recommend using redis with redsess:
https://github.com/isaacs/redsess

On Tue, Jun 26, 2012 at 7:58 AM, Bradley Meck  wrote:
> +1 for not including this, sticky sessions are painful when they become the
> least common denominator.
>
>
> On Tuesday, June 26, 2012 8:48:00 AM UTC-5, Ben Noordhuis wrote:
>>
>> On Tue, Jun 26, 2012 at 6:02 AM, dhruvbird  wrote:
>> > Just saw the blog post introducing 0.8 and it seems that it's a
>> > conscious
>> > decision to leave sticky sessions out.
>>
>> That's correct.
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Sticky sessions using the new cluster API?

2012-06-26 Thread Bradley Meck
+1 for not including this, sticky sessions are painful when they become the 
least common denominator.

On Tuesday, June 26, 2012 8:48:00 AM UTC-5, Ben Noordhuis wrote:
>
> On Tue, Jun 26, 2012 at 6:02 AM, dhruvbird  wrote: 
> > Just saw the blog post introducing 0.8 and it seems that it's a 
> conscious 
> > decision to leave sticky sessions out. 
>
> That's correct. 
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Sticky sessions using the new cluster API?

2012-06-26 Thread Ben Noordhuis
On Tue, Jun 26, 2012 at 6:02 AM, dhruvbird  wrote:
> Just saw the blog post introducing 0.8 and it seems that it's a conscious
> decision to leave sticky sessions out.

That's correct.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Sticky sessions using the new cluster API?

2012-06-25 Thread dhruvbird
Just saw the blog post introducing 0.8 and it seems that it's a conscious 
decision to leave sticky sessions out.

On Sunday, June 24, 2012 10:28:17 PM UTC-7, dhruvbird wrote:
>
> Does the node clustering module provide hooks to achieve this (sticky 
> sessions) or will I have to re-implement a bunch of things from scratch or 
> copy-paste code?
>
> On Friday, June 22, 2012 8:08:30 AM UTC-7, Bradley Meck wrote:
>>
>> There are a couple ways to do this.
>>
>> 1. Use a session store that is transactional and shared (redis etc.) and 
>> store where a session should be forwarded to.
>> 2. Use a hashing method that will consistently point to the same 
>> location/worker for the same session (session could be ip/user/etc.), if 
>> the wrong worker gets the connection, forward it to the original worker.
>> 3. Use a master/slave setup using fork rather than cluster. Master gets 
>> all the connections incoming on a machine and processes them before 
>> forwarding them to the proper worker.
>>
>> Each method has its advantages.
>>
>> The alternative to this is to change an API to be state-less, which can 
>> be hard if connections are using multiple protocols.
>>
>> On Monday, June 18, 2012 11:34:42 PM UTC-5, dhruvbird wrote:
>>>
>>> Is it possible to have sticky sessions using the new cluster API? Some 
>>> custom logic such as a cookie based solution? Something similar to nginx 
>>> sticky module?
>>>
>>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Sticky sessions using the new cluster API?

2012-06-24 Thread dhruvbird
Does the node clustering module provide hooks to achieve this (sticky 
sessions) or will I have to re-implement a bunch of things from scratch or 
copy-paste code?

On Friday, June 22, 2012 8:08:30 AM UTC-7, Bradley Meck wrote:
>
> There are a couple ways to do this.
>
> 1. Use a session store that is transactional and shared (redis etc.) and 
> store where a session should be forwarded to.
> 2. Use a hashing method that will consistently point to the same 
> location/worker for the same session (session could be ip/user/etc.), if 
> the wrong worker gets the connection, forward it to the original worker.
> 3. Use a master/slave setup using fork rather than cluster. Master gets 
> all the connections incoming on a machine and processes them before 
> forwarding them to the proper worker.
>
> Each method has its advantages.
>
> The alternative to this is to change an API to be state-less, which can be 
> hard if connections are using multiple protocols.
>
> On Monday, June 18, 2012 11:34:42 PM UTC-5, dhruvbird wrote:
>>
>> Is it possible to have sticky sessions using the new cluster API? Some 
>> custom logic such as a cookie based solution? Something similar to nginx 
>> sticky module?
>>
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Sticky sessions using the new cluster API?

2012-06-22 Thread Bradley Meck
There are a couple ways to do this.

1. Use a session store that is transactional and shared (redis etc.) and 
store where a session should be forwarded to.
2. Use a hashing method that will consistently point to the same 
location/worker for the same session (session could be ip/user/etc.), if 
the wrong worker gets the connection, forward it to the original worker.
3. Use a master/slave setup using fork rather than cluster. Master gets all 
the connections incoming on a machine and processes them before forwarding 
them to the proper worker.

Each method has its advantages.

The alternative to this is to change an API to be state-less, which can be 
hard if connections are using multiple protocols.

On Monday, June 18, 2012 11:34:42 PM UTC-5, dhruvbird wrote:
>
> Is it possible to have sticky sessions using the new cluster API? Some 
> custom logic such as a cookie based solution? Something similar to nginx 
> sticky module?
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Sticky sessions using the new cluster API?

2012-06-22 Thread Dashku
Hi,

I'm trying to work on this problem. I have an npm that extends 
node-http-proxy to provide round-robin and sticky-sessions support, I built 
an option to use Redis as the persistent memory store so that you could use 
cluster, but there's a bug somewhere so I might need help fixing that. The 
default in-process memory option works fine.

https://github.com/paulbjensen/satellite

Regards,

Paul Jensen

On Tuesday, June 19, 2012 5:34:42 AM UTC+1, dhruvbird wrote:
>
> Is it possible to have sticky sessions using the new cluster API? Some 
> custom logic such as a cookie based solution? Something similar to nginx 
> sticky module?
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en