logoalt Hacker News

jpalomakiyesterday at 7:49 PM3 repliesview on HN

Session data lookup is one select to database that gives 0..1 rows and uses index. In most cases this is not something you need to worry about.


Replies

littlecranky67yesterday at 7:57 PM

I agree. The storage space, however, is a different story. Your session DB can grow huge, depending on your session lifetime and your users logout behaviour. Plus, it is a concern in a distributed system (i.e. a token can be validated on every node, vs. a session lookup must be globally in sync)

show 1 reply
matt-pyesterday at 7:59 PM

Can even put it in redis too, if you have performance issues from looking for it in memory then you have probably have more users than google.

show 1 reply
mewpmewp2yesterday at 9:09 PM

If you have multiple services in multiple locations however, you may want to replicate this data, so in this case revocation list as it's much smaller would be far easier to replicate for much less latency overhead.