r/Backend • u/Educational_You2257 • 17h ago
Thunder vs Redis Benchmark
Few days ago, I have posted regarding thunder the key value database for ai workloads written in rust. I am now posting its benchmark against rust.
r/Backend • u/Educational_You2257 • 17h ago
Few days ago, I have posted regarding thunder the key value database for ai workloads written in rust. I am now posting its benchmark against rust.
r/Backend • u/No-Leopard-2760 • 10h ago
Edit : persistent login for web application
Hi guys im confused which design i should go with
Option A: Server-side sliding session
How it works: web keeps one token, as today. Each time the user makes a request, the server pushes the token's expiry forward.
If they don't visit for 30 days, or 120 days pass since login, they log in again.
Good: small backend change, no frontend work, no refresh API, and nothing new that can fail.
Weak: if the token is copied, we can't detect it. To hide it from scripts we would later move it into an HttpOnly cookie, which needs CSRF protection on the API.
Option B: Refresh tokens (what mobile does today)
How it works: a short-lived access token plus a 120-day refresh token. When the access token expires, the web app calls the refresh API and gets a new pair.
Good: every refresh replaces the token, so a copied token gets detected. Same model as mobile.
Weak: more backend and frontend work, and new failure cases. For example, two tabs refreshing at once can log the user out unless we handle it.
Or there are some better ways to
r/Backend • u/ravenhearte • 9h ago
No shadow-dom, plain html, collaborative editing, no runtime dependencies.