Tagged articles
2 articles
Page 1 of 1
Tencent Cloud Developer
Tencent Cloud Developer
Nov 13, 2024 · Backend Development

Design and Implementation of an E‑commerce Coupon System

The article details a high‑concurrency e‑commerce coupon system that separates creation and distribution, uses Redis‑Lua atomic stock deduction with asynchronous replenishment and coupon generation, employs a lightweight distributed‑transaction table, and adds bucket and batch optimizations to safely handle tens of thousands of TPS.

Coupon SystemRedis Luadistributed-transaction
0 likes · 11 min read
Design and Implementation of an E‑commerce Coupon System
IT Architects Alliance
IT Architects Alliance
May 24, 2022 · Backend Development

How to Ensure API Idempotency and Implement Distributed Rate Limiting in Java

This guide explains the principles of API idempotency using unique business IDs or token mechanisms, explores distributed rate‑limiting dimensions, compares token‑bucket and leaky‑bucket algorithms, and provides concrete implementations with Guava RateLimiter, Nginx configuration, and a Redis‑Lua script integrated into Spring Boot, including annotation‑based AOP for easy usage.

API idempotencyGuava RateLimiterNginx
0 likes · 19 min read
How to Ensure API Idempotency and Implement Distributed Rate Limiting in Java