-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Rewrite the varnish cookbook article #4627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dbu
commented
Dec 11, 2014
Q | A |
---|---|
Doc fix? | yes |
New docs? | yes |
Applies to | all |
Fixed tickets | #1505, #4176 |
set beresp.uncacheable = true; | ||
set beresp.ttl = 120s; | ||
return (deliver); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i split up the cache handling and ESI as they have nothing to do with each other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, we should recommend HTTP/1.1 (Cache-Control) over HTTP/1.0 (Pragma).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did that. dropped the whole pragma topic.
} | ||
} | ||
|
||
.. code-block:: varnish2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s drop Varnish 2 support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any data about the market share of each Varnish version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any data about the market share of each Varnish version?
no idea, but maybe the internet has:
https://twitter.com/dbu/status/544502440041922561
but i tend to drop it. its really outdated so new projects hopefully go
with 3 - or will need to get used to find only documentation for newer
versions anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
additionally, the only thing that is different between 2 and 3 in this file is the line about esi. and i guess a varnish2 user will easily find that when googling. so i propose to remove it.
can somebody who merges doc PRs confirm whether its ok to remove varnish2 examples?
afaik the only open thing on this one is now the question whether to drop varnish 2 examples. can any of the mergers do a decision here? otherwise i propose to keep it for now and remove it in a separate PR. |
correct port number. | ||
|
||
This port depends on your setup. Assuming that Varnish is running on the default | ||
port 80, and you have a system listening for HTTPS connections on the default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we never use serial commas. Could you please remove it before "and"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i use them ;-)
reformulated the whole paragraph, too long sentence anyways.
updated. |
|
||
This port depends on your setup. Lets say that external connections come in | ||
on the default HTTP port 80. For HTTPS connections, there is another system | ||
(as Varnish does not do HTTPS itself) on the default HTTPS port 443 that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
‘system’ is a bit vague: are you referring to an Apache or Nginx proxy here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. or haproxy or some load balancer system that does the SSL termination. i don't really want to go into the details here as its out of scope, apart from the fact that the port has to be communicated. i am assuming that people doing this will know how to do it... do you have an idea how to make this better without digressing into server setup too much?
@dbu Looks good. Last small point about HTTP 1.1 and the Pragma section: I think it makes the docs much clearer if we could just leave that out. The HTTP Cache doc chapter doesn’t mention Pragma either. (It’s true that Symfony’s Request/Response still support it, though.) On Varnish 2 support: let’s drop it; it’s from 2008, all current-generation Linux distributions (Wheezy, Trusty, etc.) ship with 3. |
i dropped the pragma mentions. and i dropped varnish 2. even RHEL 6 is on varnish 3 so indeed no point in keeping super legacy around. |
@weaverryan imho this would be ready to merge. may i ask you to have a look? once its through, i will continue on #4628 trying to figure out cookie handling. |
Thanks David for working on this feature, this is much appreciated. |
This PR was merged into the 2.3 branch. Discussion ---------- Rewrite the varnish cookbook article | Q | A | ------------- | --- | Doc fix? | yes | New docs? | yes | Applies to | all | Fixed tickets | #1505, #4176 Commits ------- dc9430a drop varnish 2 example from varnish cookbook article 9ea3671 Rewrite the varnish cookbook article
In fact, I like all the re-organization you're doing with this - it was definitely a spot that needed some love by someone with really great experience. I'm excited to get the rest merged in. Thanks! |
Btw, also many thanks to @ddeboer! It was a great to see 2 experts discussing varnish to make the docs as good as possible. |
yep, thanks a lot for the inputs and your care for the doc. imho the symfony doc is one of the strong arguments for symfony - but its a constant struggle to keep them good and updated! |
This PR was merged into the 2.3 branch. Discussion ---------- Varnish cookbook session cookie handling | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #3881 This builds on top of #4627 but i wanted to keep it separate as there are open questions in here. Commits ------- b294b24 cleanup from feedback 7a4dafc remove part about vary on cookie c88ad32 explain how to work with cookies and sessions when caching