Cloud Costs Optimization

Cloud Costs Optimization

Practical case studies, experience reports and tooling use cases from startups and enterprises

Tickets

Loading…

This video is for members only

Sravya Mallapu

Unleashing Cost Optimization : Freshworks' Journey from Startup to Scale

Submitted Jun 30, 2023

Introduction

In this talk, we will delve into the fascinating realm of cost optimization and walk through the journey of Freshworks as it scales its operations. We will cover various strategies and techniques employed to optimize costs at each stage of growth, from the early startup phase to achieving scale and efficiency.

Growth Phase : Startup to Scale

As Freshworks started growing, we encountered the need for architectural transformations to accommodate increasing demands. We will discuss our tech stack evolution from a single product to a blue-green deployment approach, highlighting the architectural changes made at each stage and the driving factors behind them. These architectural changes brought about a substantial impact on our overall cost structure, necessitating the need for effective cost optimization strategies.

To achieve cost optimization, we implemented several techniques, including booting up instances in stages, partial shutdown of instances, and adopting time-based instances that align resource allocation with workload demands. Additionally, we will deep dive into our Reserved Instance (RI) coverage strategy, which enables significant cost savings.

Navigating the Transition Phase : Agile Solutions

As the products scaled, gaining visibility into cost allocation became crucial. We will share insights on how we tagged resources to track cost distribution and implemented Cloud Custodian policies to identify and manage unused resources in lower environments. Furthermore, we will discuss our successful adoption of spot instances, leveraging their cost benefits.

Infrastructure Improvements : Best Practices and Strategies

Migration from Opsworks to Kubernetes played a pivotal role in optimizing compute costs. We will discuss the cost savings achieved through this transition and elaborate on our data transfer cost optimization efforts, including the use of VPC endpoints and interface endpoints for AWS services. Preventing inter-Availability Zone data transfer and rectifying faulty VPC configurations further contributed to substantial cost reductions. Moreover, we will share how intelligent routing and inter-product/platform communication optimization techniques minimized data transfer costs.

We will deep dive into our log optimization strategies, including enabling compression on log shipping agents and implementing retention policies for logs stored in CloudWatch and S3. Additionally, we will discuss VPC flow logs optimization, highlighting the learnings from custom formatting, dropping unnecessary fields, and the Parquet conversion process.

EBS optimization techniques such as migrating from GP2 to GP3, right-sizing volume sizes, and configuring IOPS settings will be examined. Furthermore, we will discuss how Keda autoscaling and resource optimization in Kubernetes and RDS improved efficiency and cost effectiveness.

Cost Control and Proactive Monitoring

Proactive monitoring played a vital role in cost optimization. We will share insights on how we have tailored our optimizations by automating processes for lower environments and implementing targeted alerts for production. We will also deep dive into how lambda functions are implemented alongside our Cloud Custodian policies, and how we harness the capabilities of tools like Mailer to deliver notifications via SNS, email, or Slack.

We will also share insights on how we set up alerts for cost anomalies and budget utilization, leveraged AWS Cost Explorer for insights and debugging cost anomalies, and utilized Power BI dashboards to gain comprehensive visibility into cost trends. Regular architectural reviews became a cornerstone of our cost optimization process.

Looking Ahead : Future Initiatives

We will discuss potential future initiatives, including the adoption of SQS long polling, exploration of Graviton and Intel instances for enhanced performance and cost benefits, and the implementation of a cell-based architecture to optimize communication within Availability Zones. Additionally, we will explore the automation of resource rightsizing as a focus area for further improvement and consider spot instance adoption in production environments.

In conclusion, this talk will provide valuable insights into the cost optimization journey of Freshworks, highlighting strategies, techniques, and lessons learned as we transitioned from startup to scale.

Draft Document : https://docs.google.com/document/d/1-8ZxHUkiitSRXaxL_wBBsGFmJSEzzH-Cf8YGWKolG5Y/edit?usp=sharing

Draft Presentation (In Progress) : https://docs.google.com/presentation/d/1CYyFzRzTp_8hNz_pV6-DN4L4al_hJ5VJaQG9yKvJo6w/edit?usp=sharing

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hybrid access (members only)

Hosted by

We care about site reliability, cloud costs, security and data privacy

Supported by

Sponsor

Redis a real-time data platform makes apps faster, by creating a data layer for a real-time world.

Sponsor

Mydbops - Remote DBA support for database support & solutions. Expert in optimizing the databases on cloud especially RDS, Aurora, Atlas, DocumentDB, PgSQL

Partner

FOSS United is a non-profit foundation that aims at promoting and strengthening the Free and Open Source Software (FOSS) ecosystem in India. more