News for hackers. Stuff that matters.
Re:Learn Lua in 15 Minutes (2013) by arthurcolle on Tuesday June 30, 2020 @06:38PM (#23695617)
> 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

Re:Learn Lua in 15 Minutes (2013) by VWWHFSfQ on Tuesday June 30, 2020 @06:49PM (#23695715)
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).

[1] https://github.com/openresty/lua-nginx-module

Re:Learn Lua in 15 Minutes (2013) by bepvte on Wednesday July 01, 2020 @12:22AM (#23697711)
Do you rely on redis persistence at all?
Re:Learn Lua in 15 Minutes (2013) by ende42 on Wednesday July 01, 2020 @02:17AM (#23698325)
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.

Re:Learn Lua in 15 Minutes (2013) by mpalfrey on Wednesday July 01, 2020 @03:41AM (#23698887)
+1 for Openresty Lua being great. It's saved my ass a few times.
Re:Learn Lua in 15 Minutes (2013) by leetrout on Tuesday June 30, 2020 @06:44PM (#23695671)
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.

Re:Learn Lua in 15 Minutes (2013) by ethanpil on Wednesday July 01, 2020 @12:22AM (#23697706)
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.
Re:Learn Lua in 15 Minutes (2013) by leetrout on Thursday July 02, 2020 @02:54PM (#23716669)