My profession as an Agility/DevOps consultant revolves around influencing other people to change. However, there has been a change in circumstances lately. In my organization, where I have to develop a profitable product, FaceQuest, I suddenly found that the tables had turned. This blog (series, hopefully) is a list of my significant learnings as I eat my own dog food.
In this first post, I narrate the story of how we, at FaceQuest, almost thought we were pursuing a lost cause and how we recovered.
FaceQuest being a face recognition service, we needed to store the reference faces somewhere. We created a research spike (dog food! munch, munch) to decide where to store our reference faces.
We found the service Cloudinary suitable for our needs due to the following reasons:
- We were able to build a Proof-of-concept using that. It served our needs.
- Cloudinary did not just serve our core need of storing images but also had impressive features that we may need for our future roadmap.
- Many forums also suggested Cloudinary for storing images as the cost was also affordable.
Hence, the result of our research spike was ‘Use Cloudinary’. We sealed the decision and built the product.
Another Problem Statement
A few weeks later, someone asked us ‘How much would FaceQuest cost?’ and we were like, we are yet to work on the pricing part. The time came when too many people started asking this question (the answer to which is still a work in progress). So, we created another research spike on our Trello board (woof! woof!) to understand where our money went in terms of costs.
The Bad News
The list of projected expenses was devastating! We decided to call it quits, almost!
The reasons were:
- The expenses looked decent only until we had ‘hobbyist’ users, who would not bring us revenue.
- After we pass the phase of ‘hobbyist’ users and reach ‘serious’ users, we were going to incur a spike in costs, that will require us to charge our customers obscenely.
- This obscene charge on customers will be more than the value our product provides them.
- The price of a business user plan needs to be approximately 500% more than a hobbyist plan for us to even break even.
- All of this was ridiculous and did not make any business sense.
Luckily, we didn’t quit!
The Pivot Point
We started analyzing the major components of the expenses and found that the bandwidth costs to Cloudinary were the ones that made this impossible.
Strangely, Cloudinary was not costly, instead, it was the most affordable choice for many use-cases that we have encountered in our professional journey. It was just that our use case was too peculiar. We required too many image downloads that simply went against how the majority of Cloudinary users were using it (this is just our theory!).
Hence, we decided to start another research spike to understand alternatives to Cloudinary to reduce costs. This single research spike changed major things in our tech stack.
- Amazon S3 seemed to be a good viable alternative to Cloudinary just for storing images, but the costs were controlled only when the download processes run in AWS too. The data transfer costs were nil.
- Because of this fact, we moved our face recognition worker processes from Heroku to AWS.
- Since our code was based on good design principles (I believe), we could make the above changes (1) and (2) in a matter of hours and test it.
Due to all these changes, our expenses towards image storage were 100 times less.
- Economics trumps everything.
- Systems thinking, that is, thinking of the system as a whole, is better than thinking about separate components. If not for thinking about image storage costs, we would not have moved to AWS. Though technologically, it does not matter whether the code runs on Heroku or AWS.
- Well designed code helps in pivoting faster.