• Banananomics
  • Posts
  • Shaving Millions From SaaS Production Costs

Shaving Millions From SaaS Production Costs

Top 10 Ways to Save Now

As a technical founder, I focused on building software at the lowest cost possible. Using what I learned from my mentor, who coded when hardware was limited, my team was able to shave millions from production costs.

It begins with the code and decisions based on efficiency. However, being more efficient with code usually requires sacrificing something else, such as accuracy or completeness of knowledge.

For example, a mapping application that takes all points within a radius is a slow calculation due to the trigonometry required. One can significantly speed that up by secretly turning the circle into a square at the code level. However, that may ignore specific points outside of the sharp angles.

At the production level, cost savings typically come at the expense of ease of deployment. For example, by using S3 text files over a relational database, one does not have the luxury of a SQL client to query production or the database monitoring tools to ensure erroneous data does not get in. Instead, those tools must be built from scratch.

These problems reveal the trade-off between the lowest cost and the fastest development. However, I have discovered that the upfront costs of development are far less than the significant maintenance costs of production systems.

My mentor explained that a piece of code should be able to continue operations without modifications until taken down. Some of his code was twenty years old and still in production.

The idea is to become more efficient by removing all nonessential elements. This applies to production architectures and algorithm design. Next, the requirements must be matched to the technology. Often, we use things that provide more than what is needed at the expense of computational efficiency, memory, and persistent storage costs.

Cloud providers make it easy to copy and paste production environments that are way more than we need in exchange for faster development. Again, the development cost is less than months of an expensive hosting bill or being locked into proprietary technology.

In the coming weeks, we will explore more on these topics, but to get started, here are ten tips to reduce cost now:

  1. If you are a new company or launching a new product, shop around for which cloud providers are giving away credits. I have gotten $100,000 in free credits just by completing a form.

  2. Use the lowest cost tier possible for your application. This will save money and make it easy to pinpoint bottlenecks in your codebase.

  3. Read over your monthly statements to see where most of the cost is. Most of the time, the majority of expenses come from computation and persistent storage technologies. Changing how your application's core parts work to use fewer resources can save hundreds or even thousands per month.

  4. Focus on one cost at a time. For example, if database costs are the biggest expense, solve that before trying to save on computation. Like all software engineering, it is an interactive process.

  5. Read the notes from famous architectures. Someone has often solved this problem and is more than willing to share. Also, feel free to reply to this email with a specific situation.

  6. Never use a library that you do not fully comprehend how it works. Read the source code and make changes to test how it reacts. For example, does changing a mathematical constant from 27 to 3 digits make your code faster? Is it still accurate enough for your use case?

  7. Schedule jobs that require intensive computation resources based on cost. Most cloud providers have tiers that change in price based on the time of day. Depending on the size of the job, this can translate into significant savings.

  8. Learn what open-source technology is behind the cloud provider's branded solutions. This will allow you to develop using free technology without locking a codebase into a specific vendor.

  9. Write wrappers for APIs so that switching from one technology to another requires only a few lines of updates. This can save hundreds of hours in future development costs.

  10. Understand what is most important to your user and focus all effort on providing that. For example, if real-time is not needed, do not provide it.

This should get you thinking about ways to cut SaaS production costs while maintaining a high-quality product. One thing I found is that focusing on efficiency improves the overall product significantly. As always, if you want help, reply to this email.