Skip to content
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

Rewrite the varnish cookbook article #4627

Merged
merged 2 commits into from Dec 22, 2014
Merged

Rewrite the varnish cookbook article #4627

merged 2 commits into from Dec 22, 2014

Conversation

dbu
Copy link
Contributor

@dbu 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);
}
Copy link
Contributor Author

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

Copy link
Contributor

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).

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

@dbu
Copy link
Contributor Author

dbu commented Dec 18, 2014

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
Copy link
Member

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"?

Copy link
Contributor Author

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.

@dbu
Copy link
Contributor Author

dbu commented Dec 19, 2014

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
Copy link
Contributor

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?

Copy link
Contributor Author

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?

@ddeboer
Copy link
Contributor

ddeboer commented Dec 19, 2014

@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.

@dbu
Copy link
Contributor Author

dbu commented Dec 19, 2014

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.

@dbu
Copy link
Contributor Author

dbu commented Dec 22, 2014

@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.

@weaverryan
Copy link
Member

Thanks David for working on this feature, this is much appreciated.

@weaverryan weaverryan merged commit dc9430a into symfony:2.3 Dec 22, 2014
weaverryan added a commit that referenced this pull request Dec 22, 2014
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
@weaverryan
Copy link
Member

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!

@wouterj
Copy link
Member

wouterj commented Dec 22, 2014

Btw, also many thanks to @ddeboer! It was a great to see 2 experts discussing varnish to make the docs as good as possible.

@dbu
Copy link
Contributor Author

dbu commented Dec 25, 2014

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!

weaverryan added a commit that referenced this pull request Jan 30, 2015
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
@dbu dbu deleted the cleanup-varnish-cookbook branch February 20, 2015 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants