How DigitalOcean Managed Kubernetes helps Framey scale worry-free

Framey
"Plan for scale. It will be more expensive in the beginning but worth it in the end. We are glad we set ourselves up for success with DigitalOcean.”

Framey is a social travel application that helps users get inspired, make travel plans, find new places to visit, and share it all with their friends. The app allows individuals to upload photos of the unique spots they visit while providing location information, attraction recommendations, and more.

With the rising popularity of travel bloggers and other travel influencers using social media applications to share photos from their trips, the founding team at Framey noticed that there wasn’t a good way to tag the picture’s location. Followers often asked where the picture was taken in the comments or requested additional details about the sites of the photos. The founders of Framey wanted to solve that challenge by creating an application that gave detailed location information with every posted picture.

Finding product-market-fit

They started working on the project full time in 2019 but soon discovered that the concept wasn’t enough for investors, and in 2020, travel shut down due to the COVID-19 pandemic. The feedback from the investors and the added time for development during the pandemic allowed the team to conduct additional user research. They learned more about how people were doing travel planning—often with spreadsheets, internet searches, multiple apps, and pen and paper notes. As they spoke to more potential users, the team realized there was an opportunity to build a mobile app for the entire experience, connecting the inspiration with planning and sharing your own experiences.

The team moved forward with a continued focus on the power of visual storytelling but with additional components that allowed users to plan trips within the application. Within the app, users can discover interesting locations, find travel influencers to follow, and save and plan trips and locations. When users view images from specific locations, the application will recommend nearby attractions to add to their potential trip. Users can also view a map to the site and find out the hours of operation all within the application. This expanded version of the app excited potential users and investors, and Framey was officially launched in September 2021.

Initial architecture

Framey’s founders had an excellent experience using DigitalOcean at a previous company, so they knew the platform was simple, reliable, and could help them grow their business. While researching cloud solutions, they also realized that DigitalOcean was the most affordable. While they could receive starting credits and seemingly similar pricing with hyperscalers initially, the cost to scale would quickly become prohibitive with the hyperscalers. DigitalOcean’s straightforward and transparent pricing would allow them to build now and scale in the future.

The team initially built the entire backend on a single DigitalOcean Droplet. However, as they began stress testing the application, they found significant performance issues with that setup. For example, when they would query the database to provide the fifteen closest recommended locations, the infrastructure could only handle 100 inquiries simultaneously. As the load grew, performance plummeted. They considered adding Droplets and using a load balancer before deciding that Kubernetes would be the best option for their future ambitions.

Migrating to microservices

At the time, the team didn’t have anyone in-house with DevOps expertise. They contacted DigitalOcean for assistance setting up the ideal architecture for their application and were connected with internal support from DigitalOcean as well as recommended support from an external agency to help with architecture design.

Framey’s approach is different from what other startups may decide. They didn’t want any tech debt as they scaled. Starting with Kubernetes can be challenging and expensive for a new business, but with this approach, they have a fully flexible system ready to scale. They won’t have to rebuild as they find success.

Framey’s entire tech stack is on DigitalOcean, except for a master database that’s on a bare metal server. By doing load tests, they discovered that running one to two pods of CPU-Optimized Droplets performed better than running more pods of Droplets with less CPU. With its current setup, the platform can handle loads of 200,000 to 300,000 requests per second.

Modern, event-driven, microservice architecture

frame architecture

Framey has an impressive and state-of-the-art infrastructure that uses eventing to connect its various microservices to provide fast service to its users. All of the user account information for Framey is in a self-hosted PostgreSQL database on DigitalOcean Droplets. The user accounts include things like seen pictures, people, places, categories individual users like, and more. Users can create collections of destinations—for example, Paris, France—to save all the places they want to visit when they go to that location. Framey utilizes DigitalOcean Spaces object storage and its free Content Delivery Network (CDN) to house and deliver destination images.

The main point of contact with their users was written in Node.js and later migrated to microservices using Golang. It’s connected to DigitalOcean Volumes block storage. Through an event-based architecture, Framey uses Redpanda and Kafka to connect their microservices and send almost instant notifications to users. For example, when a user is followed, Framey alerts them. If the user is popular, they get an aggregated notice such as “30 people started following you” to avoid over-notifying individuals. Since the architecture is event-based, a change in state triggers a microservice to respond. This makes their app much more responsive than traditional methods like batch processing.

Framey’s network uses an NGINX load balancer. Cloudflare sits above the load balancer, which helps the primary API direct users to the nearest DigitalOcean Kubernetes cluster. The organization has eight targeted regions with DigitalOcean Kubernetes clusters. After an event is triggered, a push notification is sent from the Spaces and Cloudflare CDN to the user. The team uses a Redis cache to decrease latency, increase throughput, and lessen the strain on their workload.

Framey keeps its infrastructure safe with the available Cloud Firewalls from DigitalOcean. As part of their automated environment, they keep their Terraform configuration on DigitalOcean Spaces to create new clusters when needed. When the Framey team pushes code to their main branch on GitHub, it starts the automated pipeline, and ArgoCD pushes a container to the DigitalOcean Container Registry. Then, the container deploys to development and staging environments. Finally, they have a manual button on GitHub to start the deployment process to their eight clusters when they are ready. To check the status of their infrastructure, they use the Prometheus and Grafana monitoring stack.

Worry-free growth

The Framey team is confident that the architecture will support the rapid growth goals of their organization, saving them time and headaches as they scale.

“It may be unconventional, but I’d suggest to anyone that starting with a good, reliable setup in the beginning is crucial to accomplishing goals and saving time later. You don’t want to get into a situation where you have a great product but then you have to go back and fix the infrastructure. That just gets harder and harder to do. Plan for scale. It will be more expensive in the beginning but worth it in the end. We are glad we set ourselves up for success with DigitalOcean.” —Robert Preoteasa- Founder, CEO

Framey

Industry

SaaS

HQ

Hungary

Start building with DigitalOcean!

Sign up now and you'll be up and running on DigitalOcean in just minutes.

Try DigitalOcean

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.