Tagged articles
Lua scripting
23 articles · Page 1 of 1
This article details 12 critical technical challenges when building a custom Redis-based distributed session system, covering token security, dual-index design, atomic Lua writes, expiration strategies, multi-device limits, renewal optimization, ThreadLocal cleanup, HA degradation, framework comparison, anomaly detection, and Redis Cluster hash-tag routing.
High AvailabilityLua scriptingMulti-Device Login
0 likes · 31 min read

This article details a distributed Redis-based solution for enforcing multiple rate-limiting rules simultaneously (e.g., 10 requests per minute and 20 per two minutes) while preventing duplicate submissions, using Zset data structures, Lua scripts for atomicity, and Spring AOP annotations.
JavaLua scriptingSpring AOP
0 likes · 12 min read

Redis sustains millions of concurrent operations not merely because it is single‑threaded, but thanks to its non‑blocking event‑loop I/O, compact in‑memory data structures, serialized command execution that eliminates lock contention, and robust production features such as replication, sharding, persistence, observability and governance.
ClusterLua scriptingevent-loop
0 likes · 40 min read

This comprehensive Redis guide covers its role as a core component in large‑scale architectures, explains common use cases, walks through installation and configuration options, details all primary data structures with commands and examples, and explores persistence, transactions, Lua scripting, replication, Sentinel, and cluster modes.
CacheClusterLua scripting
0 likes · 18 min read

The article dissects Redis’s internal architecture—its single‑threaded model, I/O multiplexing, specialized data structures, persistence mechanisms, Lua scripting, memory management, clustering, and monitoring—explaining how each design choice contributes to extreme performance and outlining the trade‑offs and best‑practice scenarios for using or avoiding Redis.
I/O multiplexingJRedisLua scripting
0 likes · 10 min read

This tutorial explains how to integrate Lua scripts with Spring Boot and Redis, covering Lua fundamentals, advantages, real‑world use cases, step‑by‑step implementation in Spring Boot, performance gains, error handling, security measures, and best practices for reliable backend development.
Lua scriptingbackend developmentperformance optimization
0 likes · 21 min read

This article explains how to integrate Lua scripts into Spring Boot applications to leverage Redis for atomic operations, performance optimization, and complex data processing, providing detailed Lua fundamentals, practical use‑cases, implementation steps, error handling, security considerations, and best‑practice recommendations.
BackendLua scriptingperformance
0 likes · 21 min read

This comprehensive guide explains how to integrate Lua scripts with Spring Boot and Redis, covering Lua fundamentals, performance benefits, practical use cases, step‑by‑step implementation in Java, error handling, security considerations, and best practices for optimizing distributed applications.
Lua scriptingredisspring-boot
0 likes · 21 min read

This guide walks you through installing the wrk load‑testing tool on Unix‑like systems, shows its basic command‑line usage with example output, and explains how to extend tests with Lua scripts for POST requests, dynamic parameters, request delays, authentication, and HTTP pipelining.
HTTP benchmarkingLua scriptingload-testing
0 likes · 10 min read

The article analyzes common inventory‑deduction scenarios, compares three approaches—single‑row MySQL, multi‑row MySQL, and Redis INCRBY—highlights the limitations of database‑based methods under heavy load, and presents a robust Redis‑Lua solution with distributed locking and Java code examples for reliable stock management.
JavaLua scriptingredis
0 likes · 12 min read

This guide walks you through installing the wrk load‑testing tool on Unix‑like systems, explains its core command‑line options, shows how to interpret benchmark results, and demonstrates advanced customization using Lua scripts for POST requests, dynamic parameters, authentication, and HTTP pipelining.
HTTPLua scriptingTool
0 likes · 14 min read

This tutorial explains Lua scripting fundamentals, why Lua is ideal for Redis, common use cases, and step‑by‑step integration of Lua scripts into Spring Boot applications—including dependency setup, configuration, code examples, performance benefits, error handling, security considerations, and best‑practice recommendations.
Lua scriptingbackend developmenterror handling
0 likes · 21 min read


IT NiukeJan 20, 2024 · Backend Development
This article explains Lua fundamentals, why Lua is advantageous inside Redis, common use‑cases such as cache updates and distributed locks, and provides step‑by‑step guidance for integrating and executing Lua scripts in a Spring Boot application to improve performance and ensure atomicity.
LuaLua scriptingatomic-operations
0 likes · 22 min read

Kruise Rollout introduces a Lua‑script based, extensible traffic routing solution that enables progressive delivery across diverse gateway resources—such as Istio, Kong, and APISIX—by dynamically modifying VirtualService and DestinationRule objects, simplifying configuration, reducing custom code, and supporting automated canary, blue‑green, and A/B testing deployments.
Gateway APIIstioKruise Rollout
0 likes · 14 min read

This article explains how to use the ngx_lua module in Nginx to assign traffic tags, implement header‑based or domain‑based routing, and integrate with dynamic upstreams for parallel testing, load testing, and gray‑release scenarios, providing code examples and configuration details.
BackendLua scriptingTraffic Routing
0 likes · 9 min read

This article explains what distributed locks are, outlines their essential properties, walks through step‑by‑step Redis implementations—from simple SETNX to Lua‑based atomic operations—and discusses reliability strategies such as master‑slave failover and RedLock while highlighting the inherent limits of any distributed lock.
Distributed LockLua scriptingRedlock
0 likes · 11 min read

This article compares MySQL‑based single and multi‑record stock deduction methods with a Redis‑based approach that uses Lua scripting and distributed locks, providing full Java implementation details and REST examples for high‑concurrency inventory management.
BackendConcurrencyJava
0 likes · 10 min read

This article explains why Redis, despite being single‑threaded, can encounter thread‑safety problems, discusses efficiency bottlenecks caused by network latency, and shows how embedded Lua scripts can create custom atomic commands, with practical examples and important considerations.
Custom CommandsLua scriptingdatabase
0 likes · 12 min read

This article explains the challenges of flash‑sale traffic spikes and presents a multi‑layered backend architecture—using CDN‑cached static pages, read‑write split Redis, Lua scripts for atomic stock deduction, and Redis‑based message queues—to achieve high concurrency, stability, and fairness.
CDNLua scriptingbackend architecture
0 likes · 9 min read

This article explains how Redis can be used for distributed locking, covering the setnx command, the SET command with NX and PX options, common pitfalls, Lua‑based atomic unlock scripts, the Redisson client, and the RedLock algorithm for achieving reliable locks across multiple nodes.
Distributed LockLua scriptingRedisson
0 likes · 10 min read

This article explains how Meituan‑Dianping leverages the open‑source tool Sysbench for repeatable database performance testing, unifies test parameters, optimizes MySQL settings such as slave_parallel_workers, extends functionality via Lua scripts, and reveals the tool’s high‑performance data‑collection techniques.
Database TestingLua scriptingMySQL
0 likes · 13 min read

This article explains the design of JD’s flash‑sale (抢购) system, covering its business model, core Redis‑based inventory management, Lua scripting for atomic stock deduction, rate‑limiting, asynchronous logging with JMQ, and fail‑over strategies to ensure high‑concurrency reliability.
Lua scriptingbackend architecturee‑commerce
0 likes · 12 min read

This article critically examines common claims that Memcached is superior for caching by comparing its design, threading, disk I/O, memory efficiency, LRU behavior, smart caching features, persistence, replication, observability, and Lua scripting capabilities against Redis, concluding that the two systems have distinct trade‑offs depending on use case.
Lua scriptingMemcachedmemory efficiency
0 likes · 9 min read
