gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 59/189: configure proxy caching


From: gnunet
Subject: [taler-grid5k] 59/189: configure proxy caching
Date: Thu, 28 Apr 2022 10:47:09 +0200

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit 8a296aa3094d9b3f58f4cbfdb638c621b731e470
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Thu Mar 10 16:14:48 2022 +0100

    configure proxy caching
---
 configs/etc/nginx/sites-enabled/proxy | 10 ++++++++++
 experiment/scripts/proxy.sh           |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/configs/etc/nginx/sites-enabled/proxy 
b/configs/etc/nginx/sites-enabled/proxy
index b96c6dc..0f1acff 100644
--- a/configs/etc/nginx/sites-enabled/proxy
+++ b/configs/etc/nginx/sites-enabled/proxy
@@ -20,6 +20,10 @@ map $request_method $log_line {
   default 1;
 }
 
+# Setup a cache with 1GB storage for our exchange
+# https://www.nginx.com/blog/nginx-caching-guide/
+proxy_cache_path /tmp/proxycache levels=1:2 keys_zone=exchange:1m inactive=1m 
max_size=10g;
+
 server {
   listen 80;
   listen 443 ssl;
@@ -38,8 +42,14 @@ server {
   keepalive_requests 100000;
 
   location / {
+
+     proxy_cache exchange;
+     # Dont cache requests too early
+     proxy_cache_min_uses 16;
+
      proxy_pass http://exchange;
      proxy_redirect off;
+
   }
 
   location /stub_status {
diff --git a/experiment/scripts/proxy.sh b/experiment/scripts/proxy.sh
index 191a3f8..baab3ca 100755
--- a/experiment/scripts/proxy.sh
+++ b/experiment/scripts/proxy.sh
@@ -82,6 +82,10 @@ function init_proxy() {
   create_cert
   setup_config
 
+  # Setup the directory where Ngxinx will place its cache
+  # configured in <g5k>/configs/etc/nginx/sites-enabledd/proxy
+  mkdir -p /tmp/proxycache
+
   restart_rsyslog
   
   # Nginx does not start until the destination server is reachable - wait here

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]