It is believed that the Symfony framework is quite heavy and it can be difficult to develop a website that will be able to work under the high load. It is true, but does this mean that it is impossible to implement a dynamic caching and to update only a small part of entire page as data is updated? This talk will give your an answer to that. It is Varnish, ESI-blocks and load balancing. With hundreds of thousands of unique visitors and million hits a day, we continue to use Symfony, and do not see any problems.
3. ‣ Head of Software Architecture
at Alpari (RU) Forex Broker
About me:
lisachenko
lisachenko
4. ‣ Head of Software Architecture
at Alpari (RU) Forex Broker
‣ Have worked with computers
since 7 years old
About me:
lisachenko
lisachenko
5. ‣ Head of Software Architecture
at Alpari (RU) Forex Broker
‣ Have worked with computers
since 7 years old
‣ Clean code advocate, guru in
enterprise architecture
About me:
lisachenko
lisachenko
6. Author of the Go! AOP
Framework
‣ http://go.aopphp.com
9. Agenda
‣ We review briefly the process of typical
Symfony site growing
‣ What is Varnish and why it’s so popular
10. Agenda
‣ We review briefly the process of typical
Symfony site growing
‣ What is Varnish and why it’s so popular
‣ How to prepare your Symfony site for
Varnish?
11. Agenda
‣ We review briefly the process of typical
Symfony site growing
‣ What is Varnish and why it’s so popular
‣ How to prepare your Symfony site for
Varnish?
‣ VCL tricks to easily handle 10K
requests/second with Symfony
76. Pros and cons of simple
cacheing
+ Page can be cached by Varnish, allowing for
faster responses.
+ Very simple to configure and use.
- Delays in the response time after cache expiration.
- We can not update information in the blocks
without a full page refresh.
- We need to render all 3 blocks at once.
87. Pros and cons of async
cacheing
+ Page can be cached by Varnish, allowing for
faster responses.
+ Very simple to configure and use.
+ No delays after cache expiration.
- We can not update information in the blocks
without full page refresh.
- We need to render all 3 blocks at once.
88. How can we update each widget
separately on the page?
101. Pros and cons of async ESI
cacheing
+ Page can be cached by Varnish, allowing for faster
responses.
+ No delays after cache expiration.
+ We can update information in the blocks without
full page refresh.
+ We render and cache each block separately. This
will result in less memory usage and better hit rate.
- Can be dangerous if used without control.
107. Tips:
‣ Always cache top-level GET-responses;
remove any cookies for them.
‣ Only ESI blocks can receive the session
cookie.
108. Tips:
‣ Always cache top-level GET-responses;
remove any cookies for them.
‣ Only ESI blocks can receive the session
cookie.
‣ Stateless ESI-blocks will not receive any
cookies at all.