Este blog está en otro idioma. ¿Te gustaría navegarlo en tu idioma actual?

cover-2

How to grow an idea or product healthily from a technological perspective with limited resources

Converting an idea into a scalable product presents numerous challenges. In this blog, we will explain how our team, in some projects, has successfully transitioned to a microservices architecture. This approach has not only maximized team efficiency but also kept infrastructure costs to a minimum, making it ideal for teams with limited budgets and personnel or those in their early stages.

Starting with a Monolith

Initial Strategy:

When starting a technology project, it is common to encounter various uncertainties regarding the choice of the best architecture or technologies to employ. Although the temptation to adopt architectures from tech giants like Google or Amazon exists, doing so in the early stages could result in unnecessary effort and a lack of focus on business objectives, especially if the team lacks the appropriate expertise.

A strategy we have found effective is to begin with a monolithic architecture, but from the start, thinking about how it could be decomposed in the future. These are the key points that will help us achieve this from the beginning:

  • The core business grouped under a common prefix for traffic routing, for example: /api/monolith/v1.
  • Authentication and scheduled tasks (cron jobs) managed outside the monolith. This helps us to add horizontal scaling without fear of cron jobs running multiple times, potentially causing harm. For example, if we have a cron job that processes subscription payments every night, scaling up could result in multiple payments being processed simultaneously on multiple nodes. With separate authentication, we can add new services without the need to rebuild for each new service.
  • Avoid storing data on disk, opting only for temporary storage. This will allow us to easily add horizontal scaling. If persistent storage is needed, S3 could be the best alternative for storing files.
  • Dockerization to standardize and streamline service deployment

For example, we can start with a couple of Dockerized services on EC2, along with an API gateway serving the purpose of authentication and routing. For this, we can use open-source services like KrakenD, Traefik, or even implement our own solution using languages such as GoLang or Rust, which can create high-performance services that meet these objectives.

image 1

Subsequently, we could adopt services in ECS, which allows us to implement auto-scaling and routing through Application Load Balancers. ECS can be a good option since container orchestration and load balancers are completely managed by the cloud service provider, freeing up more time to focus on product development rather than maintaining a cluster.

image 4

Let's suppose that the order service starts to degrade either due to the current database structure or the current project architecture. As a result, a new service with a new architecture, new data model, etc., is created. For the infrastructure, the only change needed would be to add a new route /api/orders/v1 so that traffic reaches the new service.

image 2

With this architecture, we can already support thousands of users. Now, the next step is to think about new challenges such as service-to-service communication, using protocols like gRPC, utilizing different types of nodes for services like machine learning, or installing open-source tools for various business objectives. At this point, Kubernetes is a tool that will facilitate the work, and using managed services like EKS (Elastic Kubernetes Service), GKE (Google Kubernetes Engine), AKS (Azure Kubernetes Service) are good options to consider for our workloads and evolution.

image 3

Conclusion:

If you have experience with Kubernetes and do not face constraints in terms of time, budget, and knowledge, Kubernetes could be the ideal option for your project. However, if you operate under limitations of resources, time, and knowledge, it is advisable to start with managed services and simpler solutions.

It is crucial to remember that when validating and testing new ideas, the most important thing is to find ways to deliver value quickly. Therefore, we recommend using managed services. If the idea proves successful and functional, then you will have the resources, personnel, and time necessary to further develop it.

At C4C7OPS, we are committed to sharing our experiences and providing a platform that facilitates healthy evolution. Our goal is to help you progress from a virtual machine to a few containers, and even to Kubernetes clusters, where you can effectively manage your workloads.

Join now and start optimizing your infrastructure Book a Demo

Usamos cookies para mejorar su experiencia en nuestro sitio y personalizar el contenido a sus necesidades. Al hacer clic en "Aceptar", usted acepta. Lea nuestra Política de Cookies y nuestra Política de Privacidad y Datos, y nuestros Términos y condiciones para más información.