Let's Build It: Real-time Session Invalidationby@robzhu
299 reads

Let's Build It: Real-time Session Invalidation

by Robert Zhu10mMay 23rd, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The simplest solution is to use a server-side session cache that generates and stores a session ID for each user ID. We can implement this API in two ways: polling and server-push. We want a client-side function that can tell us when the session is no longer valid: polling. We need to make a trade-off between a shorter polling interval and shorter latency. If a user successfully logs in, the session ID will be overridden. This post covers how to build, improve, and scale this feature.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Let's Build It: Real-time Session Invalidation
Robert Zhu HackerNoon profile picture
Robert Zhu

Robert Zhu

@robzhu

Current World Champion @AWS, ex-Facebook, ex-Microsoft

About @robzhu
LEARN MORE ABOUT @ROBZHU'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Robert Zhu HackerNoon profile picture
Robert Zhu@robzhu
Current World Champion @AWS, ex-Facebook, ex-Microsoft

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here