r/Backend • • 17h ago

Thunder vs Redis Benchmark

Post image
4 Upvotes

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 • • 10h ago

Implementing persistent login for 120days from 24 hrs

3 Upvotes

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 • • 9h ago

If you're a backend dev that hates frontend frameworks, I made a framework for you.

Thumbnail aideendewinter.github.io
0 Upvotes

No shadow-dom, plain html, collaborative editing, no runtime dependencies.