Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Experience in Drupal, Nginx
       and Varnish


                Ruslan Isay
                Project manager
                i20.biz company
                isay.r@i20.biz
Спонсоры
                          Генеральный спонсор

     Организатор




 Серебряный спонсор   Серебряный спонсор




 Бронзовый спонсор    Бронзовый спонсор
Agenda

1.   Server

2.   Cache

3.   Content

4.   User

5.   Developer

6.   Bonus
Requirements

More than 500 000 actual pages

800 000 of registered users

About 150 000 pages changed every month

ALWAYS serve pages quickly
Servers architecture




         NO Apache
Servers architecture
Servers architecture. Solutions

Varnish:

• no persistent storage
• flexible ESI, cache and TTL configuration
• fast memory cache
Servers architecture. Solutions

Nginx:

• persistent file storage
• hard to configure
• load balancing
• fast static cache
Servers architecture
Cache lookup
Cache refresh

• frequently page content updates
• fast appearance of new content on many pages
• quick response for user interaction
• regular changes
Hot news

• Panels
• Panels Everywhere
• edge side includes (ESI) integration
• panes
• one pane style plugin to rule all ESI
Hot news

Just manage
layouts...
Hot news

• module d.o/project/esi not used
• custom integration module
• hook for url arguments by pane type
• expiration by TTL
• pane type as ESI url part - custom TTL
• programmatic ESI control
User events

• comments
• votes
• counters
• user profile info
• user favorites
• node ratings
• content management
User events

Solution - trigger PURGE/BAN of ESI, static file
cache by URL

Modules - Purge + Cache expiration + Rules
Support & deploy

• ESI urls and callbacks back support
• stubs for future features
• AJAX/AHAH urls and callbacks back support
• scripts for "smooth" static cache regeneration
• mistake cost multiplied - always think twice...
Bonuspack. Usercache

• all cache (user/anonym) - the same
• user-specific blocks by ESI
• pass Drupal UID with COOKIES to JS for
manage "cosmetic" render

• manage cache exceptions
Bonuspack. Security - CSRF

• tokens - not available
• no proven solution
• may be tokens by ESI and custom script?
Credits

Aleksey Khodakovskiy - Drupal ideas

Alexander Kuznecov - mega admin
Thank you for attention


             Ruslan Isay
             Project manager
             i20.biz company
             isay.r@i20.biz
Спонсоры
                          Генеральный спонсор

     Организатор




 Серебряный спонсор   Серебряный спонсор




 Бронзовый спонсор    Бронзовый спонсор

More Related Content

опыт использования схемы Drupal+varnish+nginx руслан исай

  • 1. Experience in Drupal, Nginx and Varnish Ruslan Isay Project manager i20.biz company isay.r@i20.biz
  • 2. Спонсоры Генеральный спонсор Организатор Серебряный спонсор Серебряный спонсор Бронзовый спонсор Бронзовый спонсор
  • 3. Agenda 1. Server 2. Cache 3. Content 4. User 5. Developer 6. Bonus
  • 4. Requirements More than 500 000 actual pages 800 000 of registered users About 150 000 pages changed every month ALWAYS serve pages quickly
  • 7. Servers architecture. Solutions Varnish: • no persistent storage • flexible ESI, cache and TTL configuration • fast memory cache
  • 8. Servers architecture. Solutions Nginx: • persistent file storage • hard to configure • load balancing • fast static cache
  • 11. Cache refresh • frequently page content updates • fast appearance of new content on many pages • quick response for user interaction • regular changes
  • 12. Hot news • Panels • Panels Everywhere • edge side includes (ESI) integration • panes • one pane style plugin to rule all ESI
  • 14. Hot news • module d.o/project/esi not used • custom integration module • hook for url arguments by pane type • expiration by TTL • pane type as ESI url part - custom TTL • programmatic ESI control
  • 15. User events • comments • votes • counters • user profile info • user favorites • node ratings • content management
  • 16. User events Solution - trigger PURGE/BAN of ESI, static file cache by URL Modules - Purge + Cache expiration + Rules
  • 17. Support & deploy • ESI urls and callbacks back support • stubs for future features • AJAX/AHAH urls and callbacks back support • scripts for "smooth" static cache regeneration • mistake cost multiplied - always think twice...
  • 18. Bonuspack. Usercache • all cache (user/anonym) - the same • user-specific blocks by ESI • pass Drupal UID with COOKIES to JS for manage "cosmetic" render • manage cache exceptions
  • 19. Bonuspack. Security - CSRF • tokens - not available • no proven solution • may be tokens by ESI and custom script?
  • 20. Credits Aleksey Khodakovskiy - Drupal ideas Alexander Kuznecov - mega admin
  • 21. Thank you for attention Ruslan Isay Project manager i20.biz company isay.r@i20.biz
  • 22. Спонсоры Генеральный спонсор Организатор Серебряный спонсор Серебряный спонсор Бронзовый спонсор Бронзовый спонсор