Back to articles
Blog | 03/09/2025 14:34

Eco-design at MobileThinking: Architecture and Green Code

Third Challenge: Rethinking the Foundations

After streamlining the media and better distributing the workloads between the front and back ends, our third eco-design challenge tackled a less visible but equally essential area: technical architecture and the way code is structured.

And who better than Vincent, in tandem with Mipam, to explore the best practices to adopt in terms of design and development?

Because sometimes, coding more sustainably starts with thinking differently. 

Initial Observations 🔍

Behind every website, there is an "infrastructure" that allows everything to function: servers, databases, stored files, communication protocols…

These are elements often invisible on the surface, but that consume a lot of energy.

As Neil Armstrong might have said: a small click for a user, a huge impact for the servers.

Identified Issues 🤔

Our duo examined several levels of this digital "machine": 

  • Infrastructure: is it well-sized or too heavy for the actual needs?
  • Communication between the elements of the system: can we avoid certain unnecessary exchanges?
  • Database: are the queries optimised or too resource-hungry by default?
  • Service organisation (orchestration): are we pooling resources intelligently, or wasting them?
  • Storage: do we keep everything on energy-hungry "hot" servers, even when it's not necessary?
  • HTTP/3 protocol: does it really provide efficiency gains, especially on mobile?

What We Tested 🧪

To move forward, the team relied on concrete cases and measurement tools: 

  • Hydrosuit to estimate the actual energy consumption of certain operations.
  • Comparative database tests: MariaDB, PostgreSQL, SQLite, MySQL based on data volumes and query complexity.
  • Protocol comparison: HTTP/2 vs HTTP/3, especially in mobile usage.
  • Complete backend code audit (Laravel + PHP): streamlining queries, cache management, enabling optimisations like OPcache.
  • Analysis of storage types: "active" data vs archived data.
  • Tests between staging and production environments to evaluate the true energy performance gaps.

Our Improvement Avenues

Here are some decisions already implemented or planned:

  • Stick with a committed host (like Infomaniak) and bring the technical elements closer together to limit network distances.
  • Utilise CDNs (Content Delivery Networks) to serve files more efficiently, based on location.
  • Enable HTTP/3 only on mobile, where it makes sense.
  • Reconsider the structure of databases: avoid overly heavy queries, use caching, anticipate needs.
  • Streamline Docker containers and monitor their consumption with suitable tools.
  • Enable all PHP optimisations (OPcache, JIT), clean up unnecessary Laravel modules, and better distribute workloads.

Key Takeaways

This challenge has shown us that the environmental impact of a digital service is not solely determined by visible choices but also, and especially, by the technical foundations we establish from the outset.

Rethinking architecture is about shifting from an immediate performance mindset to a long-term vision, where every component has a purpose and every process serves a real need.

And this is not just a matter for backend developers or DevOps: it is a collective responsibility that begins with the initial design schematics.

To Be Continued… ✨

We have optimised the media, balanced the workloads, rethought the architecture… but another task awaits us: languages and frameworks.

  • On the backend side: Laravel, Express, other alternatives? Are all frameworks created equal?
  • On the frontend side: React, Vue, Svelte… what is their actual consumption?
  • And how can we concretely measure the impact of a language or framework, between requests, data processing, and display? 

👉 We will share all our reflections and solutions in the next article!