Posted by andribas on February 15, 2013 at 3:08pm
Today our site (local news) was hit by users that would like to know whats going on.
I have set up 2 years ago dedicated server with memcached turned on and it works great but today.
Provider of data-center told that we have reached about 80 megabit incoming traffic in peak today, proc had about 76% load.
Drupal works as nginx -> php-fpm. When server became slow, i could ssh in server, inspect processes, even worked apache on separate ip - phpmyadmin, and nginx result in 502 error on server.
I think php-fpm was slow and could not deliver data from memcached, is there approach to work direct nginx + memcached without php in Drupal?
Sorry for English.
Comments
Isn't there a Drupal
Isn't there a Drupal meteorite deflection module???
I kid.. I kid...
But really???
http://herchel.com | @mikeherchel on twitter
You kidding but I have to
You kidding but I have to take my daughter from kindergarten, because she scared, and my mother had broken window in kitchen, this is not a joke, really.
But your idea about module in Drupal is amazing!
Well, I'm glad you and your
Well, I'm glad you and your family are OK and safe!
http://herchel.com | @mikeherchel on twitter
What sort of server specs do
What sort of server specs do you have? I think server prices (especially VPSes) have dropped since 2 years ago. An upgrade might be in order.
From what I've read, Nginx has some native caching features, including "microcaching".
Varnish or/and Boost would
Varnish or/and Boost would help you!
Greetings to Chelyabinsk! :)
Thank you for greeting! i did
Thank you for greeting!
i did used boost, even allocated space in memory for that it didn't help.
what's the difference between varnish and nginx in that case?
Varnish can keep all your
Varnish can keep all your cached data in RAM.
But if all bandswith of your channel are full — nothing, except CDN (yours or outsource) can help.
here the
here the video
http://www.youtube.com/watch?v=b0cRHsApzt8
P.S. traffic was probably not incoming but outgoing, what does it matter? traffic is search from news
There was a meteor shower in
There was a meteor shower in Russia!
server is 2 xeon e5620 12 gb
server is 2 xeon e5620
12 gb ram
4 hdd 15k/sec raid 10 with hardware raid
i think drupal could make the most of it)
CSS/JS Aggregration
I'm assuming http://uralpress.ru/ is the site in question. I would turn on CSS/JS Aggregation. If you have had issues with core's aggregration, I would give AdvAgg a try.
Thank you, the site is
Thank you, the site is correct, after aggregation some features of site becomes broken. Do you think absence of cdn is the problem?
Core or AdvAgg
Did you have troubles with Core's or AdvAgg? If it was Core I would give AdvAgg a try. If it was AdvAgg then I would wait it out as the load should drop as the day is almost over.
I will try AdvAgg, we used
I will try AdvAgg, we used Core aggregation and it didn't work properly.
As far as i know nginx could not use 76-80% of proc for delivering content.
Besides css and js not aggregated, it deliver images that rely on performance of hdd.
Suppose we have 10-20 pages that requesed frequently and other stuff so-on.
Didn't they get in hardware cash?
I had the situation when i try to upload image and it fails, in peak.
Nginx returned 502 error, but server was alive.
however, our providers was also get hit by meteorit, even cellular - so i can't exactly tell what's happened, and, of course, can't repeat this situation.
No Varnish required
you just have to use all the features Nginx offers.
Think about a caching strategy.
How much time do I want to cache: TTL of content.
Is your traffic mostly anonymous?
The best place to ask Nginx + Drupal related questions is the Nginx Group.
TTL = 5 min Yes Thank you
Thank you for advice, placed question in that group.
Microcaching
it's not a one size fits all. You can taylor it to your needs. So if it's a 5 min TTL, then set it like that.
microcache zone conf;
cache configuration to adapt to your TTL. Set:
fastcgi_cache_valid 200 301 5m; # 5 minutes TTL
Thank you! It seems this is
Thank you! It seems this is exactly what i was looking for. I will try to config microcaching.