- https://earthobservatory.nasa.gov/images/146322/antarctica-melts-under-its-hottest-days-on-record
- https://www.androidcentral.com/samsung-accidentally-sends-out-find-my-mobile-push-notification-galaxy-phones-worldwide
- https://www.reddit.com/r/IWantOut/comments/f5rqx3/news_all_you_need_to_know_about_germanys_new_law/
- https://hbr.org/2018/12/how-to-collaborate-with-people-you-dont-like
- https://newrepublic.com/article/156591/wildcat-strike-grows-housing-crisis
- https://www.bbc.com/news/uk-politics-51550421
- https://www.bbc.co.uk/news/business-51525673
- https://www.blameless.com/structuring-team-software-reliability/
Bare minimum scalable WordPress
In the past weeks I had a side project to work on. Basically it is to run a WordPress website with the minimum amount of compute resources over low traffic time such as midnight and also be able to scale up once we get an increase of traffic. So at the end this increases the scalability and reliability of the WordPress site.
To reduce the AWS utilization on the elasticloadbalancers (ELB) and the RDS database I've put a memcached in the computing EC2 instances and CloudFlare as the CDN for the static content.
The general architecture is as follows:
First question I had about this to deliver the best performance possible with the minimum amount of resources was to select which AWS region to use. While looking at the traffic data, most of the traffic can be delivered with the lowest latency possible using Oregon (us-west-2).
Second step was to start provisioning the public and private subnets. This is because we don't want to expose anything but only the load balancer that is allocated inside the public subnet.
Then a little consideration about migrating the mariadb database. Both source and destination databases must be running the same version.
After the dump and import on RDS, next step was to move the wordpress files to the destination AWS storage. I chose EFS with bursting performance as the baseline, since I just want to see the overall performance with the lowest settings possible. For this I've provisioned also the EFS filesystem into two availability zones and then copied everything over with the help of a EC2 instance.
Also an important note is that I had to adjust the wp-config.php file to use the WP_HOME and WP_SITEURL to use the load balancer DNS name. Adjust the database settings and then do a cleanup and reconfiguration of the w3tc plugin.
With this EC2 instance up and running. I've took a snapshot from the EC2 instance to use that as the base AMI for the launch configuration so no need for configuration management needed when launching a new compute resource in the auto scaling group.
And what about putting everything on stress to simulate some traffic load? Well My option was to generate http requests using httperf trying to reach an amount of 3 requests per second and start doing adjustments from that point as the scaling policies.
$ httperf --server theloadbalancer.someavailabilityzone.elb.amazonaws.com --num-conn 1500 --num-cal 1 --rate 3 --timeout 5 --port 443 --ssl
The performance results with a t3a.micro instance:
The helper resources:
So far, I was speaking closely with Aldo Rivadeneira while solving some technical questions and asking for some recommendations for the architecture and overall solution. Thanks for your help buddy.
To reduce the AWS utilization on the elasticloadbalancers (ELB) and the RDS database I've put a memcached in the computing EC2 instances and CloudFlare as the CDN for the static content.
The general architecture is as follows:
![]() |
| AWS Scalable WordPress architecture |
First question I had about this to deliver the best performance possible with the minimum amount of resources was to select which AWS region to use. While looking at the traffic data, most of the traffic can be delivered with the lowest latency possible using Oregon (us-west-2).
Second step was to start provisioning the public and private subnets. This is because we don't want to expose anything but only the load balancer that is allocated inside the public subnet.
Then a little consideration about migrating the mariadb database. Both source and destination databases must be running the same version.
After the dump and import on RDS, next step was to move the wordpress files to the destination AWS storage. I chose EFS with bursting performance as the baseline, since I just want to see the overall performance with the lowest settings possible. For this I've provisioned also the EFS filesystem into two availability zones and then copied everything over with the help of a EC2 instance.
Also an important note is that I had to adjust the wp-config.php file to use the WP_HOME and WP_SITEURL to use the load balancer DNS name. Adjust the database settings and then do a cleanup and reconfiguration of the w3tc plugin.
With this EC2 instance up and running. I've took a snapshot from the EC2 instance to use that as the base AMI for the launch configuration so no need for configuration management needed when launching a new compute resource in the auto scaling group.
And what about putting everything on stress to simulate some traffic load? Well My option was to generate http requests using httperf trying to reach an amount of 3 requests per second and start doing adjustments from that point as the scaling policies.
$ httperf --server theloadbalancer.someavailabilityzone.elb.amazonaws.com --num-conn 1500 --num-cal 1 --rate 3 --timeout 5 --port 443 --ssl
The performance results with a t3a.micro instance:
- Total: connections 1500 requests 1500 replies 1500 test-duration 504.425 s
- Connection rate: 3.0 conn/s (336.3 ms/conn, <=12 concurrent connections)
- Reply status: 1xx=0 2xx=1500 3xx=0 4xx=0 5xx=0
The w3tc WordPress plugin works pretty fine in relation with the database. There's little activity on the connections and the read/write IOPS.
![]() |
| RDS 12h monitoring window |
AWS Resources:
- RDS
- EC2
- EFS
- Elastic Load Balancers
The tools:
- Terraform
- Shell
- Ansible
The helper resources:
So far, I was speaking closely with Aldo Rivadeneira while solving some technical questions and asking for some recommendations for the architecture and overall solution. Thanks for your help buddy.
- https://www.concurrencylabs.com/blog/choose-your-aws-region-wisely/
- https://serverfault.com/questions/630022/what-is-the-recommended-cidr-when-creating-vpc-on-aws
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html
- https://stackoverflow.com/questions/2537486/create-dump-file-from-database-in-mysql
- https://www.digitalocean.com/community/tutorials/how-to-import-and-export-databases-in-mysql-or-mariadb
- https://stackoverflow.com/questions/13874836/how-to-use-1-database-connection-for-read-and-another-for-write-wordpress-mysql#13875300
- http://www.akamaras.com/linux/stress-test-your-web-server-with-httperf/
- https://dev.mysql.com/doc/mysql-repo-excerpt/5.7/en/linux-installation-yum-repo.html
- https://stackoverflow.com/questions/33374314/can-not-login-to-mysql-5-7-9-after-change-password
- https://help.dreamhost.com/hc/en-us/articles/214580498-How-do-I-change-the-WordPress-Site-URL-
- https://wordpress.stackexchange.com/questions/253245/wordpress-migration-getting-404-errors-only-home-page-works
- https://www.jeffgeerling.com/blog/2017/mount-aws-efs-filesystem-on-ec2-instance-ansible
- https://docs.bitnami.com/aws/apps/wordpress-pro/configuration/wordpress-aws-s3/
- https://medium.com/qbits/autoscaling-using-custom-metrics-5f977903bc45
Weekly random links [6/52] 2020
- https://www.bbc.co.uk/news/world-europe-51526357
- https://twitter.com/filosottile/status/1229093553269362689
- https://www.inc.com/jeff-haden/why-arent-more-highly-intelligent-people-rich-a-novel-prize-winning-economist-says-another-factor-matters-a-lot-more.html
- https://hraf.yale.edu/romantic-or-disgusting-passionate-kissing-is-not-a-human-universal/
- https://www.jarednelsen.dev/posts/the-horrifically-dystopian-world-of-software-engineering-interviews/
- https://boingboing.net/2020/02/10/study-facebook-quitters-repor.html
- https://www.worldometers.info/coronavirus/
- https://www.bryanlehrer.com/entries/costco/
- https://thecorrespondent.com/283/why-poor-people-make-poor-decisions/37442933638-a4773584
- https://systemd.io/HOME_DIRECTORY/
Weekly random links [4,5/52] 2020
- https://docs.aws.amazon.com/security/
- https://www.mobs-lab.org/uploads/6/7/8/7/6787877/wuhan_novel_coronavirus_jan26.pdf
- https://www.ianvisits.co.uk/blog/2020/01/27/a-decade-of-london-in-google-street-view/
- https://www.thelocal.de/20200128/berlin-court-rules-hostel-at-north-korean-embassy-must-close
- https://anvaka.github.io/sayit/?query=programming
- https://www.bbc.com/future/article/20200127-how-a-vegan-diet-could-affect-your-intelligence
- https://www.nature.com/articles/d41586-019-03949-8
- https://lithub.com/poverty-hurts-children-in-ways-were-just-beginning-to-understand/
- https://www.technologyreview.com/s/615102/tree-planting-is-a-great-idea-that-could-become-a-dangerous-climate-distraction/
- https://news.slashdot.org/story/20/01/29/0113212/underwater-robot-reveals-hidden-base-of-antarcticas-doomsday-glacier
- https://www.thelocal.de/20200130/were-setting-a-clear-stop-sign-berlin-passes-five-year-rent-freze-law
- https://www.niemanlab.org/2020/01/the-fact-checkers-dilemma-humans-are-hardwired-to-dismiss-facts-that-dont-fit-their-worldview/
- https://physicstoday.scitation.org/doi/10.1063/PT.3.4417
- https://www.nrk.no/chasing-climate-change-1.14859595
- https://twitter.com/drtedros/status/1226629008302931971
- https://github.com/elpy1/ssh-over-ssm
Un domingo de invierno
Estos días de invierno han sido muy primaverales, sin embargo el domingo si amanecimos con una temperatura muy baja y eso nos empujó a quedarnos en casa todo el día, desayunamos con unos nopalitos, después preparé un pastel de limón, jugamos uno, jugamos Zelda, comimos lo que sobró en la semana de pasta, tomamos una siesta, nos bañamos, jugamos en la ducha, leímos un rato, platicamos entre nosotros y finalmente se fueron a dormir.
Recordé que había dos cervezas y destapé una de ellas, pusimos El Camino y mientras terminábamos de ver la película me di cuenta de algo que llevo rato haciendo pero nunca había pasado por alto: la cerveza que me estaba tomando se encontraba al tiempo, no estaba ni siquiera dentro del refrigerador; y no, tampoco estaba helado adentro de la casa como para pensar que la cerveza estuviera fría. Bueno le dije a Liss que al fin ya podía beber cerveza al tiempo sin siquiera darme cuenta, y es que su sabor es muy distinto al de mi tradicional cerveza pacífico/corona; si se mete a enfriar su sabor desaparece y entonces pierde el chiste.
![]() |
| Pastel de limón |
Weekly random links [4/52] 2020
- https://www.bbc.co.uk/news/av/world-51235865/three-women-who-were-part-of-a-quiet-resistance-against-the-nazis-in-berlin
- https://github.com/marcdacosta/border-radio-investigation
- https://media.defense.gov/2020/Jan/22/2002237484/-1/-1/0/CSI-MITIGATING-CLOUD-VULNERABILITIES_20200121.PDF
- https://www.thelocal.de/20200123/germany-bans-neo-nazi-group-combat-18
- https://blog.jpalardy.com/posts/why-learn-awk/
- https://www.conradbastable.com/essays/the-germany-shock-the-largest-economy-nobody-understands
- https://www.thelocal.de/20200121/so-is-winter-actually-coming-this-year-a-fact-check
- https://www.brookings.edu/blog/future-development/2018/09/27/a-global-tipping-point-half-the-world-is-now-middle-class-or-wealthier/
- https://www.bbc.co.uk/news/world-asia-51171834
- https://techcrunch.com/2020/01/17/digitalocean-layoffs/
- http://tomaytotomato.com/certs-waste-of-time/
- https://recipes.howstuffworks.com/bananas-are-berries.htm
- https://github.com/collabnix/kubelabs
- https://www.janipenttinen.com/post/who-is-jani-penttinen-the-game-developer
Weekly random links [3/52] 2020
- https://pingcap.com/blog/chaos-mesh-your-chaos-engineering-solution-for-system-resiliency-on-kubernetes/
- https://www.thelocal.de/20200117/new-website-shows-how-business-exploited-auschwitz-prisoners
- https://torontolife.com/city/toronto-is-surveillance-capitalisms-new-frontier/
- https://twitter.com/anttilip/status/1217529718938820610
- https://www.thelocal.de/20200116/german-startups-receive-record
- https://www.thelocal.de/20200116/traffic-chaos-as-farmers-on-tractors-protest-in-german-cities
- https://www.citylab.com/design/2020/01/berlin-architecture-history-home-design-rental-mietskasernen/604795/
- https://www.nhs.uk/news/lifestyle-and-exercise/healthy-habits-add-10-disease-free-years-your-life-study-reveals/
- https://www.lawfareblog.com/incels-americas-newest-domestic-terrorism-threat
- https://www.brookings.edu/blog/the-avenue/2020/01/08/low-unemployment-isnt-worth-much-if-the-jobs-barely-pay/
- http://www.davidc.net/sites/default/subnets/subnets.html
- https://www.searchenginejournal.com/duckduckgo-is-now-a-default-search-engine-option-on-android-in-the-eu/343073/
Suscribirse a:
Entradas (Atom)


