Tag: lua
All the articles with the tag "lua".
Implementing Rate-Limiting Algorithms with Lua Scripts
Lua scripts executed and debugged in Redis implement fixed-window, sliding-window, token-bucket, and leaky-bucket rate limiting. Request-count examples explain fixed-window boundary issues and discuss where the algorithms fit in rate limiting and traffic shaping.
Getting Started with Lua Scripts, with Example Code
A guide to Lua comments, variable scope, common data types, conditional expressions, arrays, and loops, with short examples of strings and functions. It also demonstrates calling Redis commands from Lua and provides references for the standard library and debugging tools.
Getting Started with Redis (Part 2): Basic Data Types and Commands
Basic usage of the Redis server and client, with common commands for strings, hashes, lists, sets, and sorted sets illustrated through examples of key and data operations. The article also distinguishes the atomicity of individual commands from that of an entire business workflow, and discusses the role of Lua scripts.