Tagged articles
coupon
15 articles · Page 1 of 1
The article explains why coupon expiration cannot be handled by a simple scheduled scan and presents a production‑grade architecture that uses a task‑table, four‑plane design, fine‑grained splitting, lease‑based worker coordination, idempotent updates, and observability to reliably expire billions of coupons under peak load.
ConcurrencyMySQLbatch processing
0 likes · 37 min read

This article explains how to design scalable, collision‑free coupon codes by using a custom binary layout, bit‑field allocation, checksum validation, obfuscation, Base62 encoding, and provides complete Java‑style algorithms and database schema for production use.
bit encodingcode generationcoupon
0 likes · 15 min read

This article explains how to design database tables and develop a PHP‑based backend for managing e‑commerce coupon activity rules, covering creation, editing, deletion, and logical controls such as usage limits, with step‑by‑step guidance on forms, POST handling, validation, and database operations.
PHPcoupondatabase design
0 likes · 4 min read

This article analyzes a coupon‑claiming race condition that caused stock to become negative under load and presents four solutions—including Java synchronized blocks, SQL conditional updates, Redis SETNX locks, and Redisson client locks—to reliably prevent over‑issuance in backend systems.
Distributed LockJavaSQL
0 likes · 12 min read

This article analyzes the coupon over‑issuance issue caused by concurrent requests, demonstrates why simple SQL updates can fail under load, and presents four solutions—including Java synchronized blocks, conditional SQL updates, Redis distributed locks, and Redisson’s lock implementation—to ensure atomic stock reduction and prevent negative inventory.
Distributed Lockcoupon
0 likes · 11 min read

The article analyzes why a coupon‑distribution feature can over‑issue coupons under high concurrency, demonstrates the root cause with race conditions, and presents four practical solutions—including Java synchronized blocks, SQL row‑level checks, optimistic locking, and Redis‑based distributed locks using Redisson—to ensure safe coupon redemption.
coupondistributed-lock
0 likes · 12 min read

The article analyzes why a coupon‑distribution feature can issue more coupons than available under heavy load, explains the root cause of concurrent stock deductions, and presents four practical solutions—including Java synchronized blocks, SQL row‑level locking, Redis distributed locks, and Redisson—to reliably prevent over‑issuance.
BackendJavaMySQL
0 likes · 11 min read

This article details the architectural evolution of a price‑increase coupon system used in a C2B digital‑product recycling business, covering its initial experimental phase, platformization, sharding, intelligent recommendation, Elasticsearch integration, and stability enhancements through NoSQL and read‑replica strategies.
ElasticsearchShardingc2b recycling
0 likes · 10 min read

This article analyzes the coupon over‑issuance issue caused by concurrent requests, demonstrates how simple SQL updates can fail under load, and presents four solutions—including Java synchronized blocks, SQL row‑level locking, optimistic locking, and Redis‑based distributed locks with Redisson—to ensure atomic coupon allocation.
JavaSQLcoupon
0 likes · 11 min read

This article details the design, evolution, and scaling strategies of a price‑increase coupon system for a C2B digital product recycling platform, covering its initial experimental phase, platformization, sharding‑JDBC implementation, intelligent coupon recommendation, Elasticsearch integration, and operational optimizations for high‑throughput stability.
BackendShardingcoupon
0 likes · 11 min read

This article examines why coupon stock can become negative under concurrent requests and presents four practical solutions—including Java synchronized blocks, SQL conditional updates, Redis distributed locks, and Redisson client usage—to reliably prevent coupon over‑issuance in high‑traffic systems.
ConcurrencyDistributed LockJava
0 likes · 11 min read

This article explains the complete technical design of an e‑commerce coupon system, covering data models, product‑page exposure, coupon claiming rules, high‑concurrency caching, MQ‑driven expiration handling, order‑time coupon calculation, redemption flow, and search‑based coupon indexing.
Elasticsearchcoupone-commerce
0 likes · 10 min read

This article describes the architecture and optimization of JD.com’s coupon platform, covering the JimDB distributed in‑memory database for core storage, a massive distributed task system for product coupons, high‑availability strategies for store coupons, and the overall middle‑platform design that ensures scalability, low latency, and data consistency across millions of daily transactions.
BackendCachingHigh Availability
0 likes · 8 min read

This article walks through the complete process of integrating WeChat Pay V3 coupon and voucher features into a Spring Boot application, covering account setup, API workflow, model design, a reusable Spring Boot starter, configuration details, and sample code for creating and querying coupon batches.
JavaV3 APIWeChat Pay
0 likes · 8 min read

This article provides a comprehensive walkthrough of the coupon feature's database tables—including definitions for coupons, coupon history, product relations, and category relations—along with screenshots of both admin and mobile interfaces that illustrate how these tables are used in an e‑commerce system.
SQLcoupondatabase schema
0 likes · 6 min read
