A Serverless Journey

All meaningful journeys consist of trials and tribulations as well as successes. However, it’s more important to not go at the journey alone. mobotour’s journey to serverless consisted not only of great teammates, but great partners as well. We could not have accomplished our goal without AWS and Epsagon

Our journey began in 2013 as a bootstrapped company that started out on a basic LAMP stack and native mobile SDKs with our servers being hosted with GoDaddy. As one can imagine this does not scale well at all.

After our 2nd customer, our servers started to fail. It was during this time, we decided to research other partners and from everything we researched, it appeared AWS was the partner to go all in on. We migrated our Servers and Databases to EC2 servers. Slowly I realized that in order to keep up with the growing customer base I would need to get out of the business of managing servers and services. In 2015 we successfully migrated to Elastic Beanstalk, auto scaled servers, S3 for file storage, Route53 for DNS and Aurora RDS which was fairly new. This saved us an immense amount of time and overhead.

Even though our time and energy as well as costs were coming down, we still weren’t satisfied and started reading about AWS Lambda functions which fascinated the team. It seemed that it would solve all our problems, however fairly new and unheard of. In addition, figuring out how to properly architect it was not well known. We didn’t care, we went all in on AWS and committed to Serverless.

We laid out a 6 month plan to migrate years of php legacy code to hundreds of AWS Lambda functions fronted by AWS API Gateway. In order to be successful here we implemented a single function game plan. We picked one piece of our portal (“user profile”) and perfected all aspects of leveraging the gateway, understanding VPC issues, understanding payload issues as well as hosting an Angular frontend in S3. Once we worked out these issues, we started picking off the more simple aspects of our portal and porting them to Lambda functions. Keep in mind, our team had zero experience with AWS API Gateway, Lambda, Node.js etc, however our approach allowed them to build confidence and perfect it. In addition, amazon’s documentation, support and simple implementation of their services made this all possible.

Boom!! We made it. In May of 2018 we had our portal completely serverless and our mobile app porting was completed today. It was a wild success. The final product and AWS Services (API Gateway, SQS, Lambda, VPC, NatGateway, S3, Route53, mobile SDK, Device Farm and Aurora).

Even though we were successful, something was missing. We couldn’t get a full visualization of our architecture as well as were having a hard time understanding cost management of 300+ Lambda functions. The way Lambda works is you configure the amount of RAM and it will auto scale CPU for you and then there is a cost for the length of time a function runs. If you have one rogue function it will be a costly mistake and if you know how much a function is being used, you can reduce RAM and cost. Our hypothesis is if we know these key items and can see the full architecture we’ll be able run our stack for less than $300 a month and support millions of users.

In comes Epsagon to save the day!! Nitzan, the CEO of Epsagon let me know about their awesome product they had launched and what it could do. It sounded too good to be true. However it wasn’t. Epsagon was able to provide simple instructions and within less than a few hours we had the first dashboard of all the functions and dependencies. I was able to sort on the longest running Lambda functions and most used. This was critical because in the first week we found a rogue function that was costing upwards of $15 a day and were able to resolve the issue. Without Epsagon we could’ve blown through a monthly budget. Let’s explore some of the other benefits of many.

  • Offshore development team with zero experience with Epsagon was able to easily implement the technology with no interaction from their engineering team
  • During testing of new functionality Epsagon dashboard gave me insight to an extremely long running function that was estimating double digit monthly figures when previously it wasn’t costing anything. Our team was notified and corrected the issue in less than a day reducing my cost.
  • Able to see exactly what functions I need to scale down from a memory standpoint
  • Able to understand what parts of my application and portal receive the most traffic
  • Able to tell clients with confidence my functions have had zero errors in the last two months
  • Able to see my full monthly cost with all 300+ functions
  • We are looking for funding and I can insert an Epsagon dashboard in my pitch deck to let investors know my technology stack is superior
  • Even with two companies growing with separate roadmaps, we were able to work together to accomplish success

We’ve since rolled out their latest version the new Epsagon dashboard. It’s wonderful. I am now able to show in a sales cycle our complete uptime, visual of all servers, and lack of errors with our product. This provides strategic partners insights into how powerful mobotour is.

As I mentioned in the beginning, partnerships are key to everything and we wouldn’t be here today if it wasn’t for AWS an Epsagon. We are positioned to be the next generation enterprise platform!

Cost Savings:

We will be moving to Aurora serverless option soon. Once we do this we will reduce our average monthly spend by over $500 and will still be able to support millions of users. Can you imagine having an enterprise platform where you don’t pass the cost to the customers? With Epsagon in the picture, we’ve reduced labor costs by over $500 a month just in searching and finding issues. In addition, we have already paid for the cost of the platform with the savings from the one rogue function and it’s invaluable to have the insights we do.

Lessons Learned:

The main lessons we learned that in a world of serverless that is fairly new, our team has implemented and architected our solution properly. We had not encountered anyone doing what we were and I work with some very mature development shops. We have scaled in such away that there aren’t many bottlenecks, it’s quick to correct issues, and we are getting the full value out of the move to serverless. We also learned that we needed a tool like Epsagon. Prior to the team reaching out we just thought it was going to be hard to get a full picture and understanding. There is piece of mind.

In wrapping up, we are going to take over the world and let everyone know we are the Robin Hood of SaaS … thank you AWS and Epsagon