Infra

The impact of the migration: performance doubled

Translated from French with AI assistance. Read the original

This post, clickbait title and all, is part of a series explaining how I managed to cut our Symfony2 application’s response time by a factor of 2 without changing anything in the application itself.

In this series:


The infrastructure

Here is what part of the new infrastructure ended up looking like (Varnish is OFF for now):

Infrastructure

So how does it perform in real-world use?

I mainly monitor the application with NewRelic and Graphite. Here are the metrics they picked up:

Infrastructure migration, Symfony2 application performance in NewRelic

Infrastructure migration, Symfony2 application performance in Grafana

Average response time in real-world use:

Before After
1sec ~ 1.3sec 300ms ~ 400ms

That’s response time cut in half. Not bad, right?

Conclusion

And that wraps up my field report. The application was only unavailable for 26 minutes, the time it took to migrate the database.

I know it would have been more interesting to migrate one building block at a time, finishing with the hardware migration, to find out which component brought which gain, but I had a tight deadline to migrate the whole infrastructure.

I’ve only shown you the Symfony2 application, but all in all, 8 servers had to be set up and their projects migrated. And I’d like to thank #Ansible, without which I would have spent 2 times as long on the migration (hmm, I should really write up my experience with Ansible…).

In the end, this 50% gain comes down to:

  • The switch to a new network and new hardware (thank you, SSDs)
  • The move from Apache / MySQL to Nginx / MariaDB

Load balancing plays no part in this gain: when I tested with a single backend, response times were no different. It’s there purely for scalability.

  • Infra 14
  • PHP/Symfony 4
  • Dev tools 3
  • AI 1

Article 4 of 22All articles