varnish, memcache и squid


varnish, memcache и squid

Пост csman » Вт апр 05, 2011 12:30 am

жежешечка сегодня опять рухнула, обнажив ошибку "501 caching error, powered by Varnish". После небольшого ликбеза, оказалось, что varnish это альтернатива squid - кэш-сервер для генерируемых веб-страниц. Народ вроде бы пишет, что он быстрее сквида:

In my experience varnish is much faster than squid, but equally importantly it's much less of a black box than squid is. Varnish gives you access to very detailed logs that are useful when debugging problems. It's configuration language is also much simpler and much more powerful that squid's.


Также рекомендуют использовать varnish в комбинации с мемкешем. Мемкаш позволяет уменьшить кол-во соединений с базой, а varnish позволяет снизить загрузку проца, чтобы страницы не генерировались каждый раз, а по возможности доставались в готовом виде, пример использования:

An example that could apply to stackoverflow.com: adding this comment invalidated the page cache, so this page would have to be cleared from Varnish (.. And also my profile page, which probably isn't worth caching to begin with. Remembering to invalidate all affected pages may be a bit of an issue). All the comments, however, are still in Memcache, so the database only has to write this comment. Nothing else needs to be done by the database to generate the page. All the comments are pulled by Memcache, and the page is recached until somebody affects it again (perhaps by voting my answer up). Again, the database writes the vote, all other data is pulled from Memcache, and life is fast.
Картинка участника
csman
 
Постов: 69
Зарегистрирован: Ср янв 14, 2009 3:56 pm

Обратно - Производительность

  • Последние темы на сайте
  • Другие форумы

  • Кто сейчас на нашем сайте

    На этом форуме сейчас находятся: анонимно: 0




    cron