We use NGINX + Lua [1] to collect real-time diagnostic and performance data from physical machines while they operate. We collect about 150,000 data points (HTTP requests) per second with 2 NGINX servers and 2 Redis servers. We've benchmarked this particular server group up to almost a million req/s before it started to break down (median resp time > 100ms).
Do you rely on redis persistence at all?
We recently implemented a simple streaming server based on Openresty and Redis. Redis is used as buffer. We load tested it up to 2000 mountpoints (128kbit mp3 streams) with 15.000 clients.
The architecture has some nice properties. For example the buffer being not in-process means (besides an obvious performance hit) that the streaming server can be seamlessly redeployed without loosing the buffer.
The Openresty Lua implementation is amazing.
+1 for Openresty Lua being great. It's saved my ass a few times.
Not the OP but I used openresty (fork of nginx) to cache POST requests to Redis.
It’s lightning fast.
16,000+ requests per second served from the cache.
Can you point me in the right direction for this type of implementation?
Re:Learn Lua in 15 Minutes (2013)
by anonymoushn on Thursday July 02, 2020 @11:06PM
(#23720681)
At one company that served a lot of requests from an Openresty cache, we used nginx's cache for caching full HTTP responses and lua-resty-mlcache for caching other things. lua-resty-mlcache requires one to provide a callback to get the data as a string, then a way to deserialize the string, because the l2 cache in nginx's shared memory zone will store the item as a string. We used msgpack for this part.
This came up from a quick google search https://blog.cloud66.com/supercharging-nginx-with-lua-part-3...
Can you talk more about this? Sounds like some dark magic