Questions tagged [varnish]

Varnish is a high-performance reverse proxy and load-balancer package for Linux/Unix systems.

Varnish is primarily a caching reverse proxy, but also exhibits load-balancing and backend checking mechanisms and is very widely used on high traffic websites.

Varnish was designed from the ground to be a high performance reverse caching proxy and to not compete with the operating system on managing resources like memory. Most recent versions of Varnish support storing cache on memory or disk, and serving old content in case of backend fail (saint mode), among other features.

Varnish is written by Poul-Henning Kamp (PHK), and his Architect Notes are available about varnish design. PHK is also a well known FreeBSD kernel developer and mantainer.

937 questions
0
votes
1 answer

Determining if varnish config changes are needed after adding 3 new cookies

# Keep all these cookie if (req.http.Cookie) { set req.http.Cookie = ";" + req.http.Cookie; set req.http.Cookie = regsuball(req.http.Cookie, "; +", ";"); set req.http.Cookie = regsuball(req.http.Cookie, ";(location|usertype|viewed-products)=",…
Sayaman
  • 187
  • 1
  • 11
0
votes
2 answers

apache behind varnish; htaccess deny rules ignored

So, I have a wordpress website running behind nginx -> varnish -> httpd The htaccess rule for wp-login.php is set as: allow from client ip deny from all This used to work fine without using varnish, but when I put…
iraqiboy90
  • 21
  • 4
0
votes
1 answer

Varnish sometimes (up to ~5% of the requests) triggers err_too_many_redirects, running in docker combined with plesk for wordpress

We've followed these instructions https://support.plesk.com/hc/en-us/articles/115001888894-Does-Plesk-support-Varnish- and were able to get it to work 'properly', it serves the wordpress site through varnish and the speed is amazing. All good and…
0
votes
1 answer

401 Authorization Required on Apache 2.2 when curling leads to 500 varnish error

[centos@staging03 ~]$ sudo netstat -plnt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:80 0.0.0.0:*…
Sayaman
  • 187
  • 1
  • 11
0
votes
1 answer

"FetchError no backend connection" error when Apache is running

[centos@ip-172-35-25-65 ~]$ varnishlog 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1635280998 1.0 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1635281001 1.0 10 SessionOpen c 127.0.0.2 55870…
Sayaman
  • 187
  • 1
  • 11
0
votes
1 answer

Varnish seems to not be using my `file` storage configuration

I've configured Varnish to use a file storage. Varnish seems to be working, but the cache seems to be a fraction of the size I've specified and the file I've specified for the storage does not seem to have been created. I've been running service…
0
votes
1 answer

Is there a way to write the query parameters as cookie in nginx

I would like to ask if there's a way to set the query parameters as the cookie of a certain url? Currently i'm having trouble with the varnish and nginx cause it was stripping the utm params which causes an issue with the GA. I can't remove the code…
0
votes
1 answer

Varnish doesn't open backend connection

How can I connect Varnish container with PHP-FPM + NGINX containers? Docker started correctly, site works but backendopen logs are empty. Backend is healthy (returns HTTP 200 status). varnishlog -g raw -i Backend_health 0 Backend_health - default…
0
votes
0 answers

Varnish probe thinks web is down if he gets 103 http code

This is my first post in this forum and I will say that I am sorry for all the mistakes that I will make in this post. This is a desperate call for help as I was not able to find any kind of information on my problem. I am only 20 years old and i…
0
votes
1 answer

Easiest Way to Temprarily Disable Varnish Cache (varnishadm)

What is the easiest way to tell varnish: Hey Varnish processes, please clear your cache. And also please don't cache anything at all right now. I want you to just pass all requests straight to the backend for now. I'll let you know when I want you…
Michael Altfield
  • 739
  • 2
  • 8
  • 23
0
votes
1 answer

Prevent varnish from caching cookie response

When varnish returns a cache, does it also return the cookie generated on the backend or only the css, images and html returned to the frontend? I had users tell me that they kept getting the wrong cookies, so I am thinking because the cookies are…
Sayaman
  • 187
  • 1
  • 11
0
votes
1 answer

cancel varnish cache so that it goes to the backend on the homepage only

if (req.url == "/") { return(pass); } Does this allow us to cancel the varnish only on the homepage (ex: www.prism.com) and not other pages like www.prism.com/product? I was thinking this would also work, but I am not sure, and is the above the…
Sayaman
  • 187
  • 1
  • 11
0
votes
1 answer

Can varnish serve from a port and clone the request to another port?

I have a problem to solve in my current deployment. The current one looks like this. Varnish on port 80 in front of Nginx on port 8000 backed by uWSGI The problem here is, The client want to implement some in house analytics which are required for…
Rivadiz
  • 103
  • 2
0
votes
0 answers

Cache Images centrally

Application: Serve responsive and optimized images on the fly by cropping/resizing/compressing master images Current Load: 10k request per minute, ~60MBps traffic. Current Config : NginxPlus LB sits at the top. Multiple app servers with…
Holy_diver
  • 51
  • 3
0
votes
0 answers

Failed to restart varnish.service: Unit not found

[root@server21 ~]# service varnish restart Redirecting to /bin/systemctl restart varnish.service Failed to restart varnish.service: Unit not found. This worked like 3 days ago, but today it stopped working. It works on other servers, but on this…
Sayaman
  • 187
  • 1
  • 11