Connecting to Public and User Stream


#1

Hello, I just started implementing my backoff strategies for my app, but I found a little problem and I hope anyone could help me out.

My app is connecting to both Public and User stream, so I can do my things…

In the documentation says that I should put a timer between reconnects and increment the waiting time

My problem is that I don’t know if every stream connection is independant or I should manage them as a single one.

What flow should I follow:

1.- Public stream reconnects with 5 secs timer
2.- User stream reconnects with 2 mins timer #doubled User vaule "1min"
3.- Public stream reconnects with 20 secs timer #doubled again but Public value

or:

1.- Public stream reconnects with 5 secs timer
2.- User stream reconnects with 1 min timer
3.- Public stream reconnects with 10 secs timer #doubled
4.- User stream reconnects with 2 mins timer #First doubled for User

Thanks for your help, cheers ;]