Choosing a sustainable technical stack
Sustainability RĂ©mi Nodet February 27, 2023

Choosing a sustainable technical stack

Founding a startup presents the rare opportunity of a total greenfield in terms of technology stack. Many of those early choices will very often become permanent, so it is essential to make conscious decisions rather than replicating automatically what we are used to, or the opposite, building on top of the latest framework trending on github just because it is new.

At sustainyfacts, we obviously care immensely for sustainability, and it is therefore one of our most important criterias for choosing a technical stack. But what does sustainability means for us in this context?

  1. Low maintenance: maintenance and evolutation is 80% of the total cost of ownership of software. A clean and simple architecture and keeping our technical debt minimal at all times is more important than speed of delivery.
  2. Low resource usage: our environmental footprint will be by large driven by the cloud infrastructure needed to run our services, and we must therefore take great care to use it efficiently
  3. Carefully chosen dependencies: we want to depend on reliable, proven, efficient technologies. And we want to avoid as much as possible vendor or framework lock-in.

Web site

We have choosen Hugo to build our website. It allows us to keep our content properly separated from the design, to have keep the full history in version control, and can be easily hosted for free with GitLab. Being a simple static web site (most corporate web sites don’t need more) there is no need for database or “complicated” hosting: it is fast and will never have problems scaling as all the content is static and can be cached.

To keep track of our visitors legally and respecting their privacy, we have choosen Plausible Analytics. In September 2021, the Danish Data Protection Agency has ruled Google Analytics’s usage illegal unless supplementary measures are implemented, so it was clear we were not going to use it. Plausible Analytics is easy to use, privacy-friendly, open source, and does not require any cookie banner: a dream come true!

Cloud infrastructure

We have decided to run our services on hyperscale data centers, as they are generally significantly more efficient than collocation. Furthermore, we will deploy serverless, with auto-scaling and also scale-to-zero, to avoid consuming resources when not needed. Google Cloud Run seems to be the service that suits those needs best, and selecting the region with the lowest CPU emmission factor seems an obvious choice: Switzerland (europe-west6).

Software Stack

Our microservices will be written in Golang, as it allows us to write simple services with RESTful APIs that can start in a matter milleseconds, deployable in containers with a low memory footprint and a high performance. All of that without having to depend on a castle of cards of open source projects.

As for storage, we have choosen a document database, MongoDB, and will try its servless deployment MongoDB Atlas.

Finally, all our architecture decisions are publicly documented as Architectural Decision Records in our open source project hosted on gitlab. So you’re welcome to have a look if you are curious.

Stay tuned,