SlideShare a Scribd company logo
1 of 17
Download to read offline
server architecture,
availability & scaling strategy




CTO
leonidas tsementzis
# who’s talking

               leonidas tsementzis
               aka @goldstein



*   software architect, engineer
    [all major web/mobile platforms]

*   devOps
    [enthusiast, not a real sysadmin]

*   entrepreneur
    [n00b]




     CTO                    Mobile architect   CTO
# the    high-level   requirements

* 2007
* take sport.gr to the next level...
* ... make sure it works smoothly...
* ... and fast enough
# i can see clearly now :)

* videos
 [goals, match coverage]

* comments
 [the blogging age, remember?]

* live streaming
 [ustream does not exist, yet]

* live coverage of events
 [cover it live does not exist, yet]

* user-centric design
 [personalization, ratings]

* even more videos
 [I can haz more LOLCats]
# the problem :(

*   we are planning for a 150% traffic growth but
    [6 months planning ahead]

$   video costs
    [bandwidth cost: 1€/GB]

*   comments costs
    [DB writes, CPU, disk i/o]

*   live streaming costs
    [bandwidth cost: 1€/GB]

*   limited iron resources, not happy with our current host
    [dedicated managed servers in top GR Datacenter]
# S3 to the rescue
*   87% cost reduction
    [0.13€/GB VS 1€/GB]
*   made videos section possible...
*   ...and advertisers loved it ($$$+)
*   first GR site to focus on video, key competitive advantage
*   6TB video traffic in the first month
*   hired a video editing team to support the demand
# EC2 servers on demand
*   3x(n) Application servers for the main website
    [Windows 2003, IIS 6]

*   2x(n) Application servers for APIs
    [Windows 2003, IIS 6]

*   2x(n) Servers for banner managers
    [CentOS, Apache, OpenX]

*   1x Storage server
*   2x Database servers
    [MS SQL Server 2008 with failover]

*   2x Reverse Proxy cache servers
    [Squid]

*   2x Load Balancers
    [HAProxy with failover]

*   1x monitoring server
    [munin with a lot of custom plugins]
# a nice headache




  :(          :(    :’(
# a typical week




*   peaks at 3k hits/sec once or twice/week
*   normal ratio at 300 hits/sec
*   you can’t afford the 1st
*   you can’t deliver on the 2nd
# auto-scaling to the rescue

*   if average CPU usage grows over 60% for 2 minutes, add
    another application server
*   if average CPU usage falls below 30% for 5 minutes, kill
    gracefully an application server
*   20 instances on peaks
*   3 instances (minimum) on normal operations
*   no more “Server is busy” errors
*   pay only what you (really) need
*   you can now sleep at nights
*   60% overall cost reduction
# wait, there’s more!

*   CDN & media streaming with CloudFront
*   use multiple CNAMES with CloudFront to boost HTTP
    requests
    [as per YSlow recommends]
*   CloudFront custom domains are sexy
*   robust DNS with Route 53
*   simple monitoring with CloudWatch
    [you still need an external monitoring tool]
# SUM()

*   S3                  *   CloudFront
    Photos                  Video streaming
    Videos                  CDN
    Static banners

                        *   ELB
*   EC2                     Load balancing
    Main website
    SQL Databases           RDS
                        *
    Backoffice              MySQL databases
    APIs
    Banner Managers
                        *   Route 53
    Cache servers
    Load Balancers          DNS Resolution


*   CloudWatch
    Auto-scaling
    Simple Monitoring
# lessons learned

*   test, iterate, test, iterate
*   reserved instances saves you $$
*   EC2 is a hacker playground
    [prepare for DOS attacks]

*   backup entire AMIs to S3
    [instances *WILL* #FAIL]

*   EBS disk I/O is slow, but amazon is working on this
    [problems with DB writes]

*   spawning new instances is slow
    [15 mins provisioning can be a show stopper on scaling]

*   S3 uploads/downloads are slow
*   sticky session is a must
    [we replaced AWS ELB with HAProxy just for this]

*   SLAs can't guarantee high availability
    [AWS *WILL* #FAIL]
# more lessons learned

*   devOps are hard to find
    [interested? I’m hiring]

*   automate everything
    [makes you sleep at night]

*   monitor everything
    [munin is your friend]

*   disaster prevention
    [work *ALWAYS* around the worst case scenario]

*   windows server administration is a mess
    [and AWS is not making this prettier]

*   DB scale is the hardest part
    [code changes]

*   legacy software *IS* a problem
    ** on scaling
    ** on hiring
    ** on growing (have you tried to use XMPP via ASP?)
# AWS is not perfect

*   AKAMAI is still faster compared to CloudFront
    [especially in Greece]

*   not affordable for large architectures
    [if you’re running 300+ instances, you should consider making your own
    datacenter]
# questions? challenges?




          ?
      @goldstein
      aka leonidas tsementzis

      leotsem [at] gmail.com
# thank you




          !
      @goldstein
      aka leonidas tsementzis

      leotsem [at] gmail.com

More Related Content

What's hot

[Perforce] Adventures in Build
[Perforce] Adventures in Build[Perforce] Adventures in Build
[Perforce] Adventures in BuildPerforce
 
Baking in the cloud with packer and puppet
Baking in the cloud with packer and puppetBaking in the cloud with packer and puppet
Baking in the cloud with packer and puppetAlan Parkinson
 
Selenium grid workshop london 2016
Selenium grid workshop london 2016Selenium grid workshop london 2016
Selenium grid workshop london 2016Marcus Merrell
 
Automation with Microsoft Powershell
Automation with Microsoft PowershellAutomation with Microsoft Powershell
Automation with Microsoft Powershellsubtitle
 
XPDS13: Xen on ARM Update - Stefano Stabellini, Citrix
XPDS13: Xen on ARM Update - Stefano Stabellini, CitrixXPDS13: Xen on ARM Update - Stefano Stabellini, Citrix
XPDS13: Xen on ARM Update - Stefano Stabellini, CitrixThe Linux Foundation
 
Serhiy Kalinets "Console: why should we care?"[Lightning talk]
Serhiy Kalinets "Console: why should we care?"[Lightning talk]Serhiy Kalinets "Console: why should we care?"[Lightning talk]
Serhiy Kalinets "Console: why should we care?"[Lightning talk]Fwdays
 
What's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine ManagerWhat's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine ManagerTomica Kaniski
 
Ansible 101 - Presentation at Ansible STL Meetup
Ansible 101 - Presentation at Ansible STL MeetupAnsible 101 - Presentation at Ansible STL Meetup
Ansible 101 - Presentation at Ansible STL MeetupJeff Geerling
 
Top4top Showcase
Top4top ShowcaseTop4top Showcase
Top4top Showcaseay4
 
Drupal RPG - A Backend Server Story
Drupal RPG - A Backend Server StoryDrupal RPG - A Backend Server Story
Drupal RPG - A Backend Server StoryEladio Jose Abquina
 
PuppetCamp Nj 2015- Puppet/packer presentation
PuppetCamp Nj 2015- Puppet/packer presentationPuppetCamp Nj 2015- Puppet/packer presentation
PuppetCamp Nj 2015- Puppet/packer presentationPhilip Watts
 
Building a Desktop Streaming console with Node.js and WebKit
Building a Desktop Streaming console with Node.js and WebKitBuilding a Desktop Streaming console with Node.js and WebKit
Building a Desktop Streaming console with Node.js and WebKitEmanuele Rampichini
 
Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019Katie Sylor-Miller
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulpEli McMakin
 
Colama rde
Colama rdeColama rde
Colama rdecolama
 
Building with Virtual Development Environments
Building with Virtual Development EnvironmentsBuilding with Virtual Development Environments
Building with Virtual Development EnvironmentsOscar Merida
 
Building a Desktop Streaming console with Electron and ReactJS
Building a Desktop Streaming console with Electron and ReactJSBuilding a Desktop Streaming console with Electron and ReactJS
Building a Desktop Streaming console with Electron and ReactJSEmanuele Rampichini
 

What's hot (20)

[Perforce] Adventures in Build
[Perforce] Adventures in Build[Perforce] Adventures in Build
[Perforce] Adventures in Build
 
Baking in the cloud with packer and puppet
Baking in the cloud with packer and puppetBaking in the cloud with packer and puppet
Baking in the cloud with packer and puppet
 
Selenium grid workshop london 2016
Selenium grid workshop london 2016Selenium grid workshop london 2016
Selenium grid workshop london 2016
 
Automation with Microsoft Powershell
Automation with Microsoft PowershellAutomation with Microsoft Powershell
Automation with Microsoft Powershell
 
Ansible, PHP and EC2
Ansible, PHP and EC2Ansible, PHP and EC2
Ansible, PHP and EC2
 
XPDS13: Xen on ARM Update - Stefano Stabellini, Citrix
XPDS13: Xen on ARM Update - Stefano Stabellini, CitrixXPDS13: Xen on ARM Update - Stefano Stabellini, Citrix
XPDS13: Xen on ARM Update - Stefano Stabellini, Citrix
 
Serhiy Kalinets "Console: why should we care?"[Lightning talk]
Serhiy Kalinets "Console: why should we care?"[Lightning talk]Serhiy Kalinets "Console: why should we care?"[Lightning talk]
Serhiy Kalinets "Console: why should we care?"[Lightning talk]
 
What's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine ManagerWhat's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine Manager
 
Ansible 101 - Presentation at Ansible STL Meetup
Ansible 101 - Presentation at Ansible STL MeetupAnsible 101 - Presentation at Ansible STL Meetup
Ansible 101 - Presentation at Ansible STL Meetup
 
Top4top Showcase
Top4top ShowcaseTop4top Showcase
Top4top Showcase
 
Drupal RPG - A Backend Server Story
Drupal RPG - A Backend Server StoryDrupal RPG - A Backend Server Story
Drupal RPG - A Backend Server Story
 
PuppetCamp Nj 2015- Puppet/packer presentation
PuppetCamp Nj 2015- Puppet/packer presentationPuppetCamp Nj 2015- Puppet/packer presentation
PuppetCamp Nj 2015- Puppet/packer presentation
 
Building a Desktop Streaming console with Node.js and WebKit
Building a Desktop Streaming console with Node.js and WebKitBuilding a Desktop Streaming console with Node.js and WebKit
Building a Desktop Streaming console with Node.js and WebKit
 
Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulp
 
Colama rde
Colama rdeColama rde
Colama rde
 
Building with Virtual Development Environments
Building with Virtual Development EnvironmentsBuilding with Virtual Development Environments
Building with Virtual Development Environments
 
Building a Desktop Streaming console with Electron and ReactJS
Building a Desktop Streaming console with Electron and ReactJSBuilding a Desktop Streaming console with Electron and ReactJS
Building a Desktop Streaming console with Electron and ReactJS
 
EC2 Container Service
EC2 Container ServiceEC2 Container Service
EC2 Container Service
 
Why xen slides
Why xen slidesWhy xen slides
Why xen slides
 

Similar to Server architecture & scaling strategy for a sports website

Hosting MongoDB & our experience with database as a service
Hosting MongoDB & our experience with database as a serviceHosting MongoDB & our experience with database as a service
Hosting MongoDB & our experience with database as a serviceGrzegorz Gwoźdź
 
Cloud-Aided Yocto Build Speedup
Cloud-Aided Yocto Build SpeedupCloud-Aided Yocto Build Speedup
Cloud-Aided Yocto Build SpeedupToradex
 
Automating That "Other" OS
Automating That "Other" OSAutomating That "Other" OS
Automating That "Other" OSJulian Dunn
 
ICONUK 2018 - IBM Notes V10 Performance Boost
ICONUK 2018 - IBM Notes V10 Performance BoostICONUK 2018 - IBM Notes V10 Performance Boost
ICONUK 2018 - IBM Notes V10 Performance BoostChristoph Adler
 
Running E-Business Suite Database on Oracle Database Appliance
Running E-Business Suite Database on Oracle Database ApplianceRunning E-Business Suite Database on Oracle Database Appliance
Running E-Business Suite Database on Oracle Database ApplianceMaris Elsins
 
AdminCamp 2018 - IBM Notes V10 Performance Boost
AdminCamp 2018 - IBM Notes V10 Performance BoostAdminCamp 2018 - IBM Notes V10 Performance Boost
AdminCamp 2018 - IBM Notes V10 Performance BoostChristoph Adler
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Taking SharePoint to the Cloud
Taking SharePoint to the CloudTaking SharePoint to the Cloud
Taking SharePoint to the CloudAaron Saikovski
 
CPN102 Your First Week with Amazon Elastic Compute Cloud - AWS re: Invent …
CPN102 Your First Week with Amazon Elastic Compute Cloud - AWS re: Invent …CPN102 Your First Week with Amazon Elastic Compute Cloud - AWS re: Invent …
CPN102 Your First Week with Amazon Elastic Compute Cloud - AWS re: Invent …Amazon Web Services
 
Azure Functions - Get rid of your servers, use functions!
Azure Functions - Get rid of your servers, use functions!Azure Functions - Get rid of your servers, use functions!
Azure Functions - Get rid of your servers, use functions!QAware GmbH
 
IBM Sametime 9 Installation Woes and Proactive Repairs by Keith Brooks
IBM Sametime 9 Installation Woes and Proactive Repairs by Keith BrooksIBM Sametime 9 Installation Woes and Proactive Repairs by Keith Brooks
IBM Sametime 9 Installation Woes and Proactive Repairs by Keith BrooksKeith Brooks
 
CMP301_Deep Dive on Amazon EC2 Instances
CMP301_Deep Dive on Amazon EC2 InstancesCMP301_Deep Dive on Amazon EC2 Instances
CMP301_Deep Dive on Amazon EC2 InstancesAmazon Web Services
 
DNUG Webcast: IBM Notes V10 Performance Boost
DNUG Webcast: IBM Notes V10 Performance BoostDNUG Webcast: IBM Notes V10 Performance Boost
DNUG Webcast: IBM Notes V10 Performance BoostChristoph Adler
 
Introducing Amazon RDS for PostgreSQL (DAT210) | AWS re:Invent 2013
Introducing Amazon RDS for PostgreSQL (DAT210) | AWS re:Invent 2013Introducing Amazon RDS for PostgreSQL (DAT210) | AWS re:Invent 2013
Introducing Amazon RDS for PostgreSQL (DAT210) | AWS re:Invent 2013Amazon Web Services
 

Similar to Server architecture & scaling strategy for a sports website (20)

Hosting MongoDB & our experience with database as a service
Hosting MongoDB & our experience with database as a serviceHosting MongoDB & our experience with database as a service
Hosting MongoDB & our experience with database as a service
 
Architecting for the cloud
Architecting for the cloudArchitecting for the cloud
Architecting for the cloud
 
Server Core2
Server Core2Server Core2
Server Core2
 
Cloud-Aided Yocto Build Speedup
Cloud-Aided Yocto Build SpeedupCloud-Aided Yocto Build Speedup
Cloud-Aided Yocto Build Speedup
 
Automating That "Other" OS
Automating That "Other" OSAutomating That "Other" OS
Automating That "Other" OS
 
Windows sever 2008
Windows sever 2008Windows sever 2008
Windows sever 2008
 
ICONUK 2018 - IBM Notes V10 Performance Boost
ICONUK 2018 - IBM Notes V10 Performance BoostICONUK 2018 - IBM Notes V10 Performance Boost
ICONUK 2018 - IBM Notes V10 Performance Boost
 
Running E-Business Suite Database on Oracle Database Appliance
Running E-Business Suite Database on Oracle Database ApplianceRunning E-Business Suite Database on Oracle Database Appliance
Running E-Business Suite Database on Oracle Database Appliance
 
AdminCamp 2018 - IBM Notes V10 Performance Boost
AdminCamp 2018 - IBM Notes V10 Performance BoostAdminCamp 2018 - IBM Notes V10 Performance Boost
AdminCamp 2018 - IBM Notes V10 Performance Boost
 
Ci for android OS
Ci for android OSCi for android OS
Ci for android OS
 
Aws, an intro to startups
Aws, an intro to startupsAws, an intro to startups
Aws, an intro to startups
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Taking SharePoint to the Cloud
Taking SharePoint to the CloudTaking SharePoint to the Cloud
Taking SharePoint to the Cloud
 
CPN102 Your First Week with Amazon Elastic Compute Cloud - AWS re: Invent …
CPN102 Your First Week with Amazon Elastic Compute Cloud - AWS re: Invent …CPN102 Your First Week with Amazon Elastic Compute Cloud - AWS re: Invent …
CPN102 Your First Week with Amazon Elastic Compute Cloud - AWS re: Invent …
 
Azure Functions - Get rid of your servers, use functions!
Azure Functions - Get rid of your servers, use functions!Azure Functions - Get rid of your servers, use functions!
Azure Functions - Get rid of your servers, use functions!
 
IBM Sametime 9 Installation Woes and Proactive Repairs by Keith Brooks
IBM Sametime 9 Installation Woes and Proactive Repairs by Keith BrooksIBM Sametime 9 Installation Woes and Proactive Repairs by Keith Brooks
IBM Sametime 9 Installation Woes and Proactive Repairs by Keith Brooks
 
CMP301_Deep Dive on Amazon EC2 Instances
CMP301_Deep Dive on Amazon EC2 InstancesCMP301_Deep Dive on Amazon EC2 Instances
CMP301_Deep Dive on Amazon EC2 Instances
 
DNUG Webcast: IBM Notes V10 Performance Boost
DNUG Webcast: IBM Notes V10 Performance BoostDNUG Webcast: IBM Notes V10 Performance Boost
DNUG Webcast: IBM Notes V10 Performance Boost
 
Introducing Amazon RDS for PostgreSQL (DAT210) | AWS re:Invent 2013
Introducing Amazon RDS for PostgreSQL (DAT210) | AWS re:Invent 2013Introducing Amazon RDS for PostgreSQL (DAT210) | AWS re:Invent 2013
Introducing Amazon RDS for PostgreSQL (DAT210) | AWS re:Invent 2013
 

Recently uploaded

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Recently uploaded (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

Server architecture & scaling strategy for a sports website

  • 1. server architecture, availability & scaling strategy CTO leonidas tsementzis
  • 2. # who’s talking leonidas tsementzis aka @goldstein * software architect, engineer [all major web/mobile platforms] * devOps [enthusiast, not a real sysadmin] * entrepreneur [n00b] CTO Mobile architect CTO
  • 3. # the high-level requirements * 2007 * take sport.gr to the next level... * ... make sure it works smoothly... * ... and fast enough
  • 4. # i can see clearly now :) * videos [goals, match coverage] * comments [the blogging age, remember?] * live streaming [ustream does not exist, yet] * live coverage of events [cover it live does not exist, yet] * user-centric design [personalization, ratings] * even more videos [I can haz more LOLCats]
  • 5. # the problem :( * we are planning for a 150% traffic growth but [6 months planning ahead] $ video costs [bandwidth cost: 1€/GB] * comments costs [DB writes, CPU, disk i/o] * live streaming costs [bandwidth cost: 1€/GB] * limited iron resources, not happy with our current host [dedicated managed servers in top GR Datacenter]
  • 6. # S3 to the rescue * 87% cost reduction [0.13€/GB VS 1€/GB] * made videos section possible... * ...and advertisers loved it ($$$+) * first GR site to focus on video, key competitive advantage * 6TB video traffic in the first month * hired a video editing team to support the demand
  • 7. # EC2 servers on demand * 3x(n) Application servers for the main website [Windows 2003, IIS 6] * 2x(n) Application servers for APIs [Windows 2003, IIS 6] * 2x(n) Servers for banner managers [CentOS, Apache, OpenX] * 1x Storage server * 2x Database servers [MS SQL Server 2008 with failover] * 2x Reverse Proxy cache servers [Squid] * 2x Load Balancers [HAProxy with failover] * 1x monitoring server [munin with a lot of custom plugins]
  • 8. # a nice headache :( :( :’(
  • 9. # a typical week * peaks at 3k hits/sec once or twice/week * normal ratio at 300 hits/sec * you can’t afford the 1st * you can’t deliver on the 2nd
  • 10. # auto-scaling to the rescue * if average CPU usage grows over 60% for 2 minutes, add another application server * if average CPU usage falls below 30% for 5 minutes, kill gracefully an application server * 20 instances on peaks * 3 instances (minimum) on normal operations * no more “Server is busy” errors * pay only what you (really) need * you can now sleep at nights * 60% overall cost reduction
  • 11. # wait, there’s more! * CDN & media streaming with CloudFront * use multiple CNAMES with CloudFront to boost HTTP requests [as per YSlow recommends] * CloudFront custom domains are sexy * robust DNS with Route 53 * simple monitoring with CloudWatch [you still need an external monitoring tool]
  • 12. # SUM() * S3 * CloudFront Photos Video streaming Videos CDN Static banners * ELB * EC2 Load balancing Main website SQL Databases RDS * Backoffice MySQL databases APIs Banner Managers * Route 53 Cache servers Load Balancers DNS Resolution * CloudWatch Auto-scaling Simple Monitoring
  • 13. # lessons learned * test, iterate, test, iterate * reserved instances saves you $$ * EC2 is a hacker playground [prepare for DOS attacks] * backup entire AMIs to S3 [instances *WILL* #FAIL] * EBS disk I/O is slow, but amazon is working on this [problems with DB writes] * spawning new instances is slow [15 mins provisioning can be a show stopper on scaling] * S3 uploads/downloads are slow * sticky session is a must [we replaced AWS ELB with HAProxy just for this] * SLAs can't guarantee high availability [AWS *WILL* #FAIL]
  • 14. # more lessons learned * devOps are hard to find [interested? I’m hiring] * automate everything [makes you sleep at night] * monitor everything [munin is your friend] * disaster prevention [work *ALWAYS* around the worst case scenario] * windows server administration is a mess [and AWS is not making this prettier] * DB scale is the hardest part [code changes] * legacy software *IS* a problem ** on scaling ** on hiring ** on growing (have you tried to use XMPP via ASP?)
  • 15. # AWS is not perfect * AKAMAI is still faster compared to CloudFront [especially in Greece] * not affordable for large architectures [if you’re running 300+ instances, you should consider making your own datacenter]
  • 16. # questions? challenges? ? @goldstein aka leonidas tsementzis leotsem [at] gmail.com
  • 17. # thank you ! @goldstein aka leonidas tsementzis leotsem [at] gmail.com