Isaac.Martin

← All articles

The Half-Million Dollar AWS Diet: Grabyo’s Cost-Cutting Success Story — Part 2

Introduction

Welcome to Part II of Grabyo’s AWS cost optimization journey. In Part I, we explored our initial approach and the quick wins we achieved through performance enhancements and resource optimizations. We saw how these efforts led to an impressive annual saving of $409,644.

In this second part, we’ll dive into the more strategic, long-term changes we implemented to further reduce costs and improve our AWS infrastructure. These initiatives not only contributed to additional savings but also streamlined our operations and enhanced our system architecture.

Strategic Service Migrations

3rd Party IDS to GuardDuty Migration: $7,620

In Grabyo’s early days, when our platform primarily ran on EC2 instances, a 3rd party Intrusion Detection System (IDS) served as our trusted security solution. However, as we embraced containerization and began migrating significant portions of our platform to Docker containers running on AWS Fargate, we encountered a challenge. The 3rd party IDS’s support for Fargate at the time wasn’t as robust as we needed, creating a potential gap in our security coverage.

Faced with this situation, we made a strategic decision to pivot. Amazon GuardDuty emerged as the ideal solution, offering native integration with AWS services (including Fargate), comprehensive coverage, and scalability to match our growing infrastructure needs. This transition not only enhanced our security posture but also delivered significant cost savings.

The switch to GuardDuty resulted in an annual reduction of $7,620 in EC2 costs alone. It’s worth noting that this figure doesn’t even account for the additional savings we realized from eliminating the 3rd party IDS licensing fees. The total cost reduction, when including these licensing savings, was substantially higher.

Key benefits of this migration included:

  • Improved security coverage across our entire AWS infrastructure
  • Native integration with AWS services, including Fargate
  • Simplified management and reduced operational overhead
  • Significant cost savings on both EC2 instances and licensing fees

Open Source Migration: $18,000

At Grabyo, we identified an opportunity to optimize costs by re-evaluating our reliance on proprietary servers crucial to our live streaming capabilities. These servers incurred an annual licensing fee of $18,000, prompting us to explore open-source alternatives.

The migration process was not without its challenges. It required meticulous planning, extensive testing, and careful coordination to ensure a seamless transition without impacting our service quality. However, the results were significant:

  • Eliminated the $18,000 annual licensing cost
  • Maintained live streaming performance at par with the proprietary solution
  • Increased flexibility and customization options to better suit our specific needs
  • Reduced vendor lock-in, giving us more control over our technology stack

While we can’t disclose the specific technologies involved due to competitive reasons, this initiative demonstrates that open-source solutions can often match or even surpass proprietary systems at a fraction of the cost. It aligns with our philosophy of leveraging community-driven technologies and highlights the value of regularly re-evaluating our technology stack for optimization opportunities.

Nexus Repository Migration: $1,368

Our journey to Nexus began with a startling price hike from our previous provider, JFrog. Initially, we were paying a reasonable $15 per month ($180 per year) for our repository needs. However, in September 2023, JFrog implemented a dramatic price increase, multiplying their rates by a factor of ten. Suddenly, our monthly costs skyrocketed to $150, which would translate to an annual expense of $1,800.

This unexpected price surge prompted us to explore alternatives, leading us to Nexus. After careful evaluation, we determined that Nexus could meet all our repository needs while offering a much more cost-effective solution. The migration process was meticulously planned and executed to ensure a smooth transition with minimal disruption to our development workflows.

By switching to Nexus, we reduced our monthly repository costs to just $36. This translates to an annual saving of $1,368 — a significant reduction from what we would have paid with JFrog’s new pricing.

Beyond the cost savings, this migration brought additional benefits:

  • Improved developer workflow with faster artifact retrieval
  • Enhanced flexibility in managing our repositories
  • Reduced dependency on a single vendor

This initiative underscores the importance of regularly reviewing and challenging our tooling choices, especially in response to significant price changes from vendors.

Microservices to Lambda Migration: $1,468 (98% cost reduction)

Our cost optimization efforts led us to migrate two of our microservices to AWS Lambda, yielding impressive results. This transition resulted in a 98% overall cost reduction for the two services, translating to annual savings of $1,468. The benefits, however, extended far beyond mere cost savings.

Key advantages of this migration included:

  • Improved scalability through automatic workload adjustment
  • Reduced operational overhead by minimizing server maintenance
  • Enhanced development agility with quicker deployments and updates
  • Better alignment of costs with the actual value derived from these services

This successful transition has had a profound impact on our development strategy. The significant cost savings and operational benefits have led to a shift in our approach: Lambda is now becoming our go-to technology for microservices across all our teams, gradually replacing our Docker-based services.

As we continue to expand its implementation, this initiative serves as a blueprint for future serverless migrations across our platform. It promises not only continued cost optimizations but also improved operational efficiency, reinforcing our commitment to leveraging the most effective technologies in our quest for optimal performance and resource utilization.

Service Retirement and Consolidation

Retiring Social Analytics: $5,080

In our optimization efforts, we faced a decision regarding our social analytics module. Recent API changes by platforms like Twitter (now X) and Facebook significantly reduced the depth and quality of data we could access. As a result, our analytics were no longer providing the comprehensive insights our customers sought.

Recognizing this shift in value proposition, we seized the opportunity to retire the feature altogether. This decision not only aligned with our cost-saving goals but also ensured we weren’t maintaining a feature that fell short of our quality standards. The results were significant:

  • Cost Savings: $5,080 annually by shutting down associated compute resources.
  • Simplified Architecture: Eliminated 38,368 lines of code, reducing system complexity.
  • Enhanced Developer Productivity: Faster iterations and reduced cognitive load for our team.
  • Easier Maintenance: Fewer potential failure points and simplified processes.
  • Improved Focus: Resources redirected to features providing more value to our customers.

The key takeaway from this initiative is the importance of continually evaluating our product features. By staying vigilant and identifying components that no longer serve their original purpose due to external changes or evolving user needs, we can proactively retire them. This approach not only reduces complexity and operational costs but also ensures our platform remains lean and agile.

Eliminating Unused Services: $432

In our ongoing effort to optimize costs, a routine inspection of AWS Cost Explorer revealed an unexpected charge: we were paying $36 monthly for AWS Global Accelerator, a service we weren’t actively using.

Further investigation uncovered that this service had been enabled by one of our developers for a proof of concept (POC) that never became a platform feature. The Global Accelerator instance, however, remained active, silently accruing charges.

This discovery presented us with a classic “low-hanging fruit” opportunity. By simply stopping this unused service, we immediately reduced our monthly AWS bill by $36, translating to an annual saving of $432.

Key takeaways from this experience:

  • Regular cost reviews can reveal unexpected savings opportunities.
  • It’s crucial to track and clean up resources used for POCs.
  • Even seemingly small monthly costs can add up to significant annual savings.

This incident reinforced the importance of vigilance in cost management. We’re now implementing processes to better track POC projects and their associated resources, ensuring our AWS environment remains lean and efficient. It’s a reminder that in cloud infrastructure management, sometimes the most impactful savings come from simply eliminating what’s no longer needed.

Conclusion

Our journey of cost optimization at Grabyo has been both challenging and rewarding. Through a combination of performance enhancements, resource optimization, strategic migrations, and service consolidation, we’ve managed to achieve annual savings of approximately $500,000. This significant reduction in our AWS costs not only improves our bottom line but also allows us to reinvest these savings into innovation and growth.

Key lessons from our experience include:

  1. Regular Review is Crucial: Continuously monitor and analyze your cloud spend to identify optimization opportunities.
  2. Think Holistically: Cost savings can come from various sources — from major architectural changes to simple cleanup tasks.
  3. Embrace New Technologies: Stay informed about new AWS services and features that can offer better performance at lower costs.
  4. Challenge the Status Quo: Don’t be afraid to question existing setups and explore alternatives, including open-source solutions.
  5. Automate Where Possible: Tools like our EC2 Cost Detective can prevent unnecessary spending and foster a cost-conscious culture.
  6. Balance Cost and Function: Always ensure that cost-saving measures don’t compromise the quality or functionality of your services.
  7. Retire Unused Features: Regularly evaluate your product features and be willing to retire those that no longer provide value.
  8. Mind the Small Costs: Even small, recurring charges can add up to significant amounts over time.

As we move forward, we remain committed to continuous improvement and cost optimization. Our journey has shown us that there’s always room for improvement, whether it’s in fine-tuning our existing systems or making bold moves to new technologies.

We hope that sharing our experiences will inspire and help other organizations in their own cost-efficiency journeys. Remember, every dollar saved is a dollar that can be invested in growth and innovation. The path to optimal cloud cost management is ongoing, but with diligence, creativity, and a willingness to challenge assumptions, significant savings are within reach for any organization.