All case studies
Treebo
Self-ServiceEnvironment Management

How Treebo made every production cluster match staging

Treebo, a premium-budget hotel chain in India, was taking its SaaS product Hotel Superhero to international clients and needed identical production clusters in new regions. With Facets, Treebo's DevOps team builds every cluster from the same code: production issues fell 70%, deployments take half the time, and 80% of DevOps time now goes to tooling and strategic work.

At a glance

  • 70% fewer
    production issues
  • 80%
    of DevOps time now goes to tooling, guidelines and research
  • 50% less
    time to deploy
  • Days to minutes
    for tenant onboarding
Customer
Treebo Hotels, a premium-budget hotel chain in India founded in 2015, and Hotel Superhero, its SaaS product for accommodation businesses
Scale
600+ hotels in 100+ cities and 2 million+ guests (2022); Hotel Superhero had international clients from day one; AWS
The moment
Hotel Superhero needed a setup in Africa, and the India setup, built over seven years for one region, could not be copied exactly
What changed
Treebo's DevOps team owns the IaC and builds staging and every production cluster from the same code in Facets; environments spin up with a single click, and new tenants go live through templates
Time frame
2022: staging, then production, both live within 2022

The moment

For seven years, Treebo built almost all its technology in house, and all of it ran in India. Part of the infrastructure was set up by hand and part by scripts, which worked well for one region. Then Hotel Superhero signed an international client, and Treebo had to build a setup in Africa. There was no way to copy the India setup exactly. At the same time, as the business grew, production support took most of the DevOps team's days.

“The biggest challenge for the DevOps team was that they would spend good 70, 80% of their time in solving production issues or helping the development teams out in debugging ...”

Kadam Jeet JainKadam Jeet JainCo-Founder and CTO, Treebo Hotels and Hotel Superhero

Before: how work flowed

Diagram: before Facets, production support came first and no setup could be copied. Developers write code and deploy through Jenkins. The DevOps team spends 70 to 80% of its time on production issues, and production issues and debugging requests come back to it from the AWS India setup, built over seven years for one region. A new setup in Africa had no way to copy the India setup.

  • Production support first. Production issues and debugging help took 70 to 80% of DevOps time, so every other request waited longer.
  • No single source for operations. Many alerts were set one by one in CloudWatch, with no one place to change them.
  • Setups that drift. Part of the stack was set up by hand, which worked for one region; over time staging and production drifted apart, and a new region could not be built the same way.
  • Pipelines doing two jobs. Jenkins ran both CI and CD, so each pipeline carried both jobs and grew complex.
  • A setup for each tenant. Each new Hotel Superhero tenant needed its own workers, queues and schemas, so the work grew with every tenant signed.

What they tried first

Treebo had a strong build-in-house culture. It had its own infrastructure automation and workflow tools, good CI and CD pipelines on Jenkins, and its own logging stack. Deployments were safe, and these tools served Treebo well in one region; as the business grew, running them took a growing share of the teams' time. The DevOps team had also started to explore Kubernetes on the side and wanted to run it in production.

Why Facets

Treebo would need many production clusters, and Kadam put the bar plainly: "it's mission critical for the success of the business itself that each production cluster has identical specs."

Treebo had two concerns. Would Treebo build a strong dependency on Facets? And would Facets pre-solve every problem and leave the DevOps team, keen to run Kubernetes in production, nothing to learn? Both concerns went away as the team worked with the platform. Facets runs on Kubernetes, so the team could still work directly with servers and pods and build on top of it.

“As we built familiarity with Facets, the concerns were mitigated. Since Facets is built over standard offerings like Terraform, we can still build much more on top of it! The combination works really well. Facets is only making it simpler which otherwise would need 3X more time and resources. With instances of co-architecting and problem-solving, our team developed faith in the product and the team.”

Kadam Jeet JainKadam Jeet JainCo-Founder and CTO, Treebo Hotels and Hotel Superhero

How it worked

Timeline: Treebo moved staging first, then production. Rollout phases in order, not to scale. 2015 onward, before Facets: seven years of in-house tech for one India region, with alerts set one by one, a self-run logging stack, and Jenkins for CI and CD. Hotel Superhero goes international: a client needs a setup in Africa, the India setup cannot be copied, and DevOps spends 70 to 80% of its time on production issues. 2022, on Facets: services, databases, queues and caches move to Facets, staging first. Then production: production clusters move once staging is stable, tenant templates go live, and CI and CD are split. 2022 plan for the next 6 to 12 months: a cloud-agnostic Hotel Superhero, multi-AZ high availability, regional fault tolerance and OpenTelemetry.

Staging, then production. Treebo's DevOps team moved all its services, databases, queues and caches to Facets, staging first. Once staging was stable and the team knew the product, production followed.

One standard, all as code. Treebo's DevOps team owns the IaC: alerting, monitoring, deployment and infrastructure creation are all defined as code in Facets. No part of the stack is created by hand, so staging and every production cluster come out the same. Any environment can be spun up or terminated with a single click, which made new regions simpler to add.

Tenants from templates. When Hotel Superhero creates a tenant, the templates start what it needs: a message queue, database schemas and tenant-specific workers. Other tenants are not affected.

CI and CD split. Treebo's team kept Jenkins for CI only and moved deployment to Facets. The pipelines became simpler, easier to maintain and faster.

One dashboard for operations. Treebo's SRE and operations teams deploy, roll back, track metrics and scale services from the Facets dashboard, with no server logins.

After: how work flows now

Diagram: after Facets, every cluster comes from the same code. Developers plan deployment, alerts and scaling. Facets builds staging and every production cluster on AWS from one codebase, and tenants from templates, so staging matches production and the clusters match each other. The DevOps team owns the IaC, spends 80% of its time on tooling, and improves the tooling.

Every environment now comes from the same code, so when production breaks, the team knows the cause is in the code and not in an infrastructure difference. The DevOps team owns the IaC and spends most of its time on tooling, guidelines and research for developers.

Results

70% fewerproduction issuesStaging and every production cluster come from the same code
80%of DevOps time now goes to tooling, guidelines and researchFewer production issues and no infrastructure built by hand
50% lesstime to deployJenkins does only CI, and Facets handles deployment
Days to minutesfor tenant onboardingTemplates create each tenant's queue, schemas and workers

In their words

“With Facets we have true infrastructure-as-code including alerting, monitoring, deployment and infrastructure creation. Our Staging environments now look identical to Production environments and we now have multiple production clusters which in turn look similar. This is a big win for us!”

Kadam Jeet JainKadam Jeet JainCo-Founder and CTO, Treebo Hotels and Hotel Superhero

“Earlier the development teams were only worried about their code. Facets have created awareness for Developers - I can already see developers now aware of, How will my code be deployed? What kind of infrastructure does it need? What kind of alerting needs to be set up? What kind of autoscaling is needed?”

Kadam Jeet JainKadam Jeet JainCo-Founder and CTO, Treebo Hotels and Hotel Superhero

What's next

In 2022, Treebo planned to make Hotel Superhero cloud agnostic within 6 to 12 months, so a client could ask for AWS, GCP or Azure. Next on the list were a multi-AZ high-availability setup, regional fault tolerance and OpenTelemetry.

The idea this story proves

Treebo's win was simple to state: staging and every production cluster come from one model, so they cannot drift apart, and a new region or a new tenant is a request instead of a project. Facets calls this environments as a commodity.

Related stories