System Design · Middle · Question 12 of 75

What is the main drawback of stateless JWTs compared to server-side sessions?

Explanation

The server verifies the signature without hitting the DB, which is convenient for scaling. But if a user is banned or a token is stolen, it keeps working. Solutions: short-lived access tokens, rotating refresh tokens, a revocation list (which partially brings state back).

Further reading

Problem with a question

System Design · Middle · question 12

Test yourself

Take the System Design · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz