failed to run balancer_by_lua*: balancer_by_lua:2: module 'ngx.balancer' not found:

2017-10-26 Thread rnmx18
Hi, I am getting the following error when I try to use balancer_by_lua with ngx.balancer in my NGINX configuration. 2017/10/26 08:13:38 [error] 22447#22447: *10 failed to run balancer_by_lua*: balancer_by_lua:2: module 'ngx.balancer' not found: no field package.preload['ngx.balancer']

Crash observed while using nginx-upstream-carp along with zone directive

2017-10-24 Thread rnmx18
Hi, I am trying to use the following "NGINX upstream carp" module to realize upstream load balancing with a certain server affinity for requests. https://github.com/olegloa/nginx-upstream-carp The following basic configuration works fine. upstream mybackends { server 192.168.1.3:872

Re: Periodic external HTTP exchange from NGINX for dynamic control of upstream server list

2017-10-18 Thread rnmx18
Hi Philip, Yes. The link which you referred to, definitely tries to address quite a similar problem as what I had described earlier. I need to get more familiar with Lua and its usage with NGINX. Thanks for your reply. Regards, Rajesh Posted at Nginx Forum: https://forum.nginx.org/read.php?2

Periodic external HTTP exchange from NGINX for dynamic control of upstream server list

2017-10-17 Thread rnmx18
Hi, I have a requirement to de-select or exclude one or more servers from an upstream group, if that server is either just newborn or exhausted (overloaded or showing reduced performance). So, consider there are servers A, B and C in the upstream group. An external program periodically checks A,

Re: RE: Multiple upstream_cache_status headers in response in a dual-cache configuration

2017-10-06 Thread rnmx18
Hi, Thank you Maxim and Reinis for your replies. I verified that when the response from backend-hdd-cache gets cached in the front-end ssd-cache, the response includes the X-Upstream-Server-Cache-Status header added from the hdd-cache-upstream.Hence, I am seeing two headers in a response served by

Multiple upstream_cache_status headers in response in a dual-cache configuration

2017-10-06 Thread rnmx18
Hi, To realize a distributed caching layer based of disk-speed and storage, I have prepared the following configuration with an SSD-cache and HDD-cache. http { add_header X-UpStream-Server-Cache-Status $upstream_cache_status; # proxy caching configurations proxy_cache_path /tmp/myss

Using request URI path to store cached files instead of MD5 hash-based path

2017-10-05 Thread rnmx18
Hi, If proxy caching is enabled, NGINX is saving the files under subdirectories of the proxy_cache_path, based on the MD5 hash of the cache-key and the levels parameter value. Is it possible to change this behaviour through configuration to cache the files using the request URI path itself, say,

Proxy buffering and slow clients related issues

2017-10-02 Thread rnmx18
Hi, We are trying to use NGINX for caching service in low bandwidth, high latency mobile networks. The service is to stream 10-sec video segments of different types ranging from 2MB to 50MB. NGINX proxy_buffering configuration is as follows: proxy_buffering on; proxy_buffer_size

Re: Can the cacheloader process stay alive and keep rebuilding or updating the cache metadata?

2017-09-29 Thread rnmx18
Probably, I should clarify that the use-case which I described above would use the same cache-configuration for both NGINX processes - so same proxy-cache-path and proxy-cache-key specifications. Using a different cache-key would obviously create conflict in cached file path. Thanks Rajesh Poste

Re: Can the cacheloader process stay alive and keep rebuilding or updating the cache metadata?

2017-09-29 Thread rnmx18
It would help in a use-case when there are 2 NGINX processes, both working with the same cache directory. NGINX-A runs with a proxy-cache-path /disk1/cache with zone name "cacheA". NGINX-B runs with the same proxy-cache-path /disk1/cache with zone name "cacheB". When NGINX-B adds content to the

Re: Can NGINX cache metadata get updated automatically, if file is added through backdoor by another NGINX proxy-cache?

2017-09-29 Thread rnmx18
Hi Maxim, Thanks for your inputs. I now understand that it is probably better, not to externally interfere with the contents of the cache directory assigned to NGINX. Regards Rajesh Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276611,276625#msg-276625 _

Can the cacheloader process stay alive and keep rebuilding or updating the cache metadata?

2017-09-29 Thread rnmx18
Hi, As I understand, during startup, the cache loader process scans the files in the defined proxy-cache-path directories, and builds up the in-memory-metadata. Once the metadata is built-up, the cache loader process exits. Is there any mechanism by which, this cache loader process can be made to

Re: Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread rnmx18
Hi Lucas, Thanks for that suggestion about split_clients directive. I will consider it in my evaluation. Regards Rajesh Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276612,276623#msg-276623 ___ nginx mailing list nginx@nginx.org http://m

Re: Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread rnmx18
Hi Lucas, As long as the cached files (with the metadata at the beginning) reside in the directory specified with the proxy_cache_path directive, they are fine. The NGINX-proxy, which added them there in the first place, can serve the content correctly, after skipping the right amount of metadata

Re: Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread rnmx18
Hi Reinis, Thank you for that pointer to proxy_store directive. I understand that this would be a useful option for static files. However, my application currently cannot handle aspects like expiry, revalidation, eviction etc. So, I guess I will not be able to use the proxy_store directive for th

Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread rnmx18
Hi, While caching files on disk, NGINX-proxy adds certain metadata at the the beginning of the file. Can such files be served by NGINX (acting a server)? Is there a method to skip the metadata part and just serve the content from such a cached file.? Apologies if this is a dumb question. Just st

Can NGINX cache metadata get updated automatically, if file is added through backdoor by another NGINX proxy-cache?

2017-09-29 Thread rnmx18
Hi, I have a use-case, where NGINX (say NGINX-process-1) is set up as a reverse proxy, with caching enabled (say in /mnt/disk2/pubRoot, with zone name "cacheA"). However, I have another NGINX (say NGINX-Process-B) which also runs in parallel, and caches its content in (/mnt/disk2/frontstore, with