Tagged articles
4 articles
Page 1 of 1
SpringMeng
SpringMeng
Feb 21, 2026 · Backend Development

How to Elegantly Implement an Online User Count with Redis ZSET

This article explains how to build a real‑time online user counter by identifying users via tokens or browser fingerprints, storing them in a Redis sorted set, and using ZADD, ZRANGEBYSCORE, ZREMRANGEBYSCORE and ZREM commands to add, query, and clean the data.

BackendFingerprintJSJava
0 likes · 7 min read
How to Elegantly Implement an Online User Count with Redis ZSET
macrozheng
macrozheng
Sep 11, 2025 · Backend Development

Track Online Users with Redis ZSET in Spring Boot

This guide explains how to implement an online user counting feature using Redis sorted sets (ZSET) in a Spring Boot application, covering user identification via tokens or browser fingerprinting, adding, querying, and cleaning up entries with zadd, zrangeByScore, zremrangeByScore, and zrem commands.

Backend DevelopmentFingerprintJSOnline Users
0 likes · 8 min read
Track Online Users with Redis ZSET in Spring Boot
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jul 11, 2024 · Backend Development

Implementing Online User Counting with Redis Sorted Sets (zset)

This article explains how to track online users by assigning each user a unique identifier, storing it in a Redis sorted set with an expiration timestamp, and using zadd, zrangeByScore, zremrangeByScore, and zrem commands together with browser fingerprinting to reliably count and clean up active sessions.

BackendFingerprintJSJavaScript
0 likes · 7 min read
Implementing Online User Counting with Redis Sorted Sets (zset)