3 ms·
> Nowadays I use it in NGINX for high-velocity requests that are just backed by Redis. Can you talk more about this? Sounds like some dark magic
by arthurcolle 6y ago
> Nowadays I use it in NGINX for high-velocity requests that are just backed by Redis.
Can you talk more about this? Sounds like some dark magic
- leetrout 6y agoNot 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.
- ethanpil 6y agoCan you point me in the right direction for this type of implementation?
- leetrout 6y agoThis came up from a quick google search https://blog.cloud66.com/supercharging-nginx-with-lua-part-3/ https://blog.cloud66.com/supercharging-nginx-with-lua-part-3...
- anonymoushn 6y agoAt 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.
- VWWHFSfQ 6y agoWe 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). [1] https://github.com/openresty/lua-nginx-module https://github.com/openresty/lua-nginx-module
- bepvte 6y agoDo you rely on redis persistence at all?
- ende42 6y agoWe 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.
- mpalfrey 6y ago+1 for Openresty Lua being great. It's saved my ass a few times.