Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Titouan Galopin:
How to build a scalable Symfony application on Kubernetes
Aug 20, 2018 @ 16:23:17

Titouan Galopin has written up a post to his Medium.com site showing a method he's created to set up a scalable Symfony application on Kubernetes, a container management system.

Modern web applications are complex. The expectations of your users regarding your application are constantly increasing: nowadays, an application needs to be fast, convenient, easy to use and beautiful.

Meeting these demands can become another difficulty in the path towards creating a great product. [...] To ease this new difficulty and decrease the time spent on creating and maintaining these expected features, a modern application usually leverages many different components, from content delivery networks (CDN) to full text search services and load balancers.

[...] When you use such infrastructure, being able to interact easily with all its components from within your application is critical. This is where Kubernetes and Symfony are working together to help you achieve incredible results, extremely quickly.

The post starts by introducing some of the basics around Kubernetes for those not familiar with it and the platform they'll be using: Google Cloud Platform. He then talks some about using Symfony in a Kubernetes environment and the role that scalability plays in how you write your code. He makes a few suggestions to make it easier including:

  • Use Flysystem to store your application files in the managed file store
  • Configure Doctrine to use the provided SQL service
  • Use Redis for your cache and your sessions

There's a description for each item in the list, configuration examples where they'd help illustrate, and some links out to other resources for more information.

tagged: symfony tutorial kubernetes scaleable application docker container

Link: https://medium.com/@galopintitouan/how-to-build-a-scalable-symfony-application-on-kubernetes-30f23bf304e

Learnk8s.io Blog:
How to deploy Laravel to Kubernetes
Apr 30, 2018 @ 18:10:24

The Learnk8x.io blog has a tutorial they've posted showing you how to deploy a Laravel application to Kubernetes. Kubernetes is a system created to make it simpler to deploy containerized applications in a clustered context.

Vagrant is very good with setting up a local environment similar to a remote server. However, in production, you will most likely require more than just one web host and one database. You’ll probably have separate services for several requirements. You also need to have mechanisms in place to ensure that the application is always online and that the servers can efficiently balance the load.

In this article, I’ll explain how to deal with the simple requirement of running a Laravel application as a local Kubernetes set up.

The article then gets into the "whats" and "whys" of using Kubernetes and an introduction to the Minikube local Kubernetes environment. It runs through some of the prerequisites to getting the deployment set up and provides the Docker configuration to create and link the containers together. With that defined it provides the commands to get the environment up and running and the application deployed. The final part of the tutorial covers the scaling of the system and allowing ingress to the application through a certain URL.

tagged: kubernetes tutorial deploy laravel application docker container

Link: https://learnk8s.io/blog/deploying-laravel-to-kubernetes

Delicious Brains Blog:
Running WordPress in a Kubernetes Cluster
Aug 22, 2017 @ 14:35:08

On the Delicious Brains blog Gilbert Pellegrom has written up a post showing you how to get WordPress up and running on a Kubernetes cluster, making use of the helm tool to help with the installation process.

As a developer I try to keep my eye on the progression of technologies that I might not use every day, but are important to understand as they might indirectly affect my work. For example the recent rise of containerization, popularized by Docker, used for hosting web apps at scale. I’m not technically a devops person but as I build web apps on a daily basis it’s good for me to keep my eye on how these technologies are progressing.

[...] In this article, we’re going to start simple and take a look at the Kubernetes platform and how you can set up a WordPress site on a single node cluster on your local machine.

The tutorial then walks you through installing the local Kubernetes using Minikube and, once that's all set up and configured, using Helm to install WordPress in the cluster. He then shows how to scale the installation of WordPress and set up the system for high availability.

tagged: wordpress kubernetes cluster tutorial install configure helm minikube

Link: https://deliciousbrains.com/running-wordpress-kubernetes-cluster/

TeachersPayTeachers Engineering Blog:
Challenges faced while scaling to serve millions of views per
Jun 15, 2017 @ 17:49:33

On the TeachersPayTeachers.com Engineering blog they've posted a retrospective of what they went through to scale to millions of views per day on AWS using Kubernetes, React, PHP, and Elixir.

Here at Teachers Pay Teachers (or TpT, as we call it) we’ve been in the process of migrating our website from a PHP monolith to a microservice based architecture utilizing React, Phoenix and GraphQL. To date, this migration has delighted our community of educators with it’s myriad of UX improvements. We’re able to objectively measure these improvements with our A/B testing infrastructure which also enables us to gradually expose functionality to broader and broader levels of traffic.

Our product page receives ~2 million pages views per day making it the most heavily trafficked page on TpT (here’s an example page). We decided to use a simple UI refresh as an opportunity to migrate the page to our new tech stack. This post dives deeply into the challenges we overcame while scaling the product page on our new infrastructure!

The post then shows an infographic of their migration and the major steps in the process along a timeline. They also include an overview of their updated architecture, specific technical issues found during the migration and handling server load. They also cover error spikes they saw just after scaling and how they were either able to resolve or just dismiss them as "red herrings".

tagged: teacherspayteachers scaling microservice aws kubernetes react elixir casestudy

Link: http://engineering.teacherspayteachers.com/2017/06/05/challenges-faced-while-scaling-to-serve-millions-of-views-per-day.html


Trending Topics: