Post on 05-Jul-2015
description
HIGH PERFORMANCE
FOR MEDIA WEBSITEPierre Jean Duvivier
Responsable WebFactoryEdipresse SA
WHAT IS A « BIG MEDIA WEBSITE » ?WHAT IS A « BIG MEDIA WEBSITE » ?
TDG.CHTDG.CH
50’000 unique visitor by day – up to 400’000 pages views by day100 native edipresse news by day + breaking news via AFP, ATS
24 HEURES.CH24 HEURES.CH
35’000 unique visitor by day – up to 300’000 pages views by day100 news every day + external feed like ATP, AFS
LEMATIN.CHLEMATIN.CH
80’000 unique visitor by day – up to 500’000 pages views by day> 100 news by days + external Feed of all edipresse’s website
WHAT IS GOOD PERFORMANCES ?WHAT IS GOOD PERFORMANCES ?
Stable. It means that website is online during the maximum of time. 100 % is the maximum. A good rate is > 99.5 %
Fast. It means that page are downloaded quickly by users. A good rate < 5-7 s
« Right » Cost . It means that you have the right cost for the best result.
OUR WORST PROBLEMSOUR WORST PROBLEMS
Global Architecture for 11 websites and 190’000 uniques visitors by day
-Free & Simple well known solution (apache, mysql) to lower the complexity to maintain it (cost and knowledge)
- Group fonctionnalities to make economy. Use Firewall to do load balancing
- Spécialization :- FrontEnd (Apache)- Database (MySQL)- Cache Server (MemCache)- NFS (Binaries)
SYSTEM ARCHITECTUREFOR 190’000 uniques visitors by days (RED)
The max number of connections.
What happen : with a lot of users, each user when he surf on a webpage launch severals calls to apache. (to retreive css, jpg, ect…) opening one connection each time. (Image represent more than 66 % of Image represent more than 66 % of the bandwith and a large part of this call)the bandwith and a large part of this call)
Problem : Apache & Mysql can accept only a limited number of connection
Symptom for users : Users are queued and the time to load a page increase.
Images consume a lof of ressourcesAnd connections
Solutions to manage the Max number of connection
DIVIDE THE TASKS BETWEEN YOUR SERVERSWORK WITH THE HTTP PROTOCOL (EXPIRY)BECAREFULL WITH ERROR PAGES (404, 310.ect..)
Database Load Problem
What happen : webmaster and user(s) use a lot database access for all the action inside our CMS.
Problem : Databases servers overload when a lot of queries come.
Symptom for users : Instability : website don’t work for users and journalist / webmaster.
Solutions to manage the database load problem
PEAK TRAFIC PROBLEM
TRAFIC ON MEDIA WEBSITE IS NOT UNIFORM DURING THE DAY.THE MOST IMPORTANT TRAFIC IS SUPPORTED BETWEEN 8H and 10H.
HOW TO MANAGE WITH THE PEAK PROBLEM ?
We have still problem with this peak and we did not find the « right » solution
What solution(s) we don’t use to manage performance problem ?
SOLUTIONS WHAT IS IT ? WHY ?
Reverse proxy like Squid,
Varnish, Apache modProxy …
It replace the front end servers
serving a page already in html
« cached »
We will increase system
complexity then cost. No so easy
to setup and maintain it
Alternative PHP Cache
Compilation des scripts PHP
We didn’t test it for the moment. An option in the
future
Amazon network cache system (S3) or Akamai
You use a lot of servers in network (or p2p) to deliver
your content
We are interested to use Amazon s3
to server our image…next
upgrade
What solution(s) we don’t use to manage performance problem ?
SOLUTIONS WHAT IS IT ? WHY ?
Reverse proxy like Squid,
Varnish, Apache modProxy …
It replace the front end servers
serving a page already in html
« cached »
We will increase system
complexity then cost. No so easy
to setup and maintain it
Alternative PHP Cache
Compilation des scripts PHP
We didn’t test it for the moment. An option in the
future
Amazon network cache system (S3) or Akamai
You use a lot of servers in network (or p2p) to deliver
your content
We are interested to use Amazon s3
to server our image…next
upgrade