Are session id's unique over time?

#1

I am wanting to monitor sessions and store meta information in a database table. I’m wondering if session id’s are sufficiently unique over time so that I could use them as a primary key.

Thanks in advance.

Regards,

Andrew Eddie

0 Likes

#2

Hi Andrew!

First of all: please excuse the late answer.

For what it’s still worth: Not a good idea unless you have small numbers of sessions. At ~90 million sessions you’d already have a 50% chance of collisions - so for anything longer running, probably something to stay away from.

Regards,

Alex

···

Am Donnerstag, 10. Dezember 2015 07:32:10 UTC+1 schrieb Andrew Eddie:

I am wanting to monitor sessions and store meta information in a database table. I’m wondering if session id’s are sufficiently unique over time so that I could use them as a primary key.

Thanks in advance.

Regards,

Andrew Eddie

0 Likes

#3

Session IDs are randomly drawn from 1…2^53

That is a lot …

···

Sent from Mobile (Google Nexus 5)

Am 10.12.2015 7:32 vorm. schrieb “Andrew Eddie” mamb...@gmail.com:

I am wanting to monitor sessions and store meta information in a database table. I’m wondering if session id’s are sufficiently unique over time so that I could use them as a primary key.

Thanks in advance.

Regards,

Andrew Eddie

You received this message because you are subscribed to the Google Groups “Crossbar” group.

To unsubscribe from this group and stop receiving emails from it, send an email to crossbario+...@googlegroups.com.

To post to this group, send email to cross...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/c69e1c99-90a3-4c78-b026-021fa578913f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

0 Likes