Continuing where colleague Chris Cherrett left off at MODXpo 2013, Mark Willis will talk about a possible workflow for building and maintaining MODX sites on a high availability platform.
Previous: ◆ 8+ years experience in Linux + PHP ◆ 50 million+ hits/month ➔ Now: ◆ Custom development for MODx sites ◆ Developing hosting and infrastructure
like cattle ➔ All identical hardware ➔ Managed by Puppet/gold image ➔ All logs forwarded to Logstash ➔ Scale up on 5 minute load average ➔ Scale down on 15 minute average
same. ➔ Saturday - Wednesday scale by 1 ➔ Thursday - Friday scale by 2 ➔ Servers built from a pre-built "gold" image ➔ From alert to serving requests ~2 minutes
Simple to understand ➔ Works out the box ➔ Quick on SSD ➔ Cache per site Cons ➔ Single server ➔ Heavy disk IO when cold ➔ Slowest form of caching ➔ File locking / herding ➔ Herd effect
Files – Slower than APC ➔ Distributed ➔ Reduced Herding Cons ➔ No wildcard delete ➔ 1 instance per partition ➔ 1 Port per partition ➔ 1Mb value limit ➔ Run the maths: Partitions Size (mb) # Sites Ram / Site Total RAM 9 64 15 576Mb 8,640 Mb
Supporting infrastructure - slow migration to Puppet ➔ Client Third Party servers - code deployments managed by Puppet (set- up managed their hosting provider)
server locations - every deployment is identical mco rpc -W servertype=php puppet runonce # Run puppet on all "php" cluster servers mco rpc -W servertype=client1 puppet runonce # Run puppet on "client1" servers
auto built on initial POST hook ➔ Each job has it’s own demo site http://adido- phpunit.adido-devs.com ➔ “Deployment” triggers all tests to run – successful = triggered deployment