Cost Optimization: How We Slashed $500K Using IaC, Containers, and More

Cost Optimization: How We Slashed $500K Using IaC, Containers, and More

 

Controlling cloud infrastructure costs is critical for any company, but especially in the early stages of a startup. As you scale, cloud costs can easily spiral out of control if not properly managed. We learned this lesson early on when our AWS bill unexpectedly jumped 20% one month due to inefficient resource utilization.

After some research, we realized that using Infrastructure as Code (IaC) tools like Terraform could help abstract away the underlying cloud provider and allow us to seamlessly transition across AWS, Azure, and GCP. The key benefit was avoiding vendor lock-in – if one provider’s costs increased, we could easily switch to another without rewriting all our infrastructure code.

In this blog, We will walk through how we leveraged Terraform and related tooling to setup easy portability across cloud providers. This has been one of our best return on investment (ROI) decisions, already saving us over $500K in costs while retaining full flexibility to switch providers if needed.

Some key benefits we realized by using Terraform were:

Increased efficiency
Minimized configuration drift
Cost optimization
Collaboration
Reproducibility

Overall, adopting Terraform allowed us to implement IaC principles for provisioning and managing infrastructure efficiently. This increased our agility while reducing risks and costs associated with configuration drift.

Containerization with Kubernetes

By containerizing our application and adopting Kubernetes orchestration, we gain granular control over resource allocation and scalability. Kubernetes’ efficient resource management allows us to pack more workloads onto fewer resources, maximizing utilization and minimizing idle capacity.

Some key benefits we saw from using Kubernetes:

Dynamic resource allocation – We can specify resource requests and limits for each container, and Kubernetes will allocate cluster resources accordingly. This ensures containers get the resources they need without overprovisioning.

Horizontal scaling – We can easily scale our applications up and down by changing the number of pod replicas. Need to handle more users? Simply increase the number of pods.

Optimized hardware utilization – Kubernetes efficiently packs containers onto nodes, maximizing resource utilization. Features like bin packing ensure high density of containers per node.

Automatic bin packing – Kubernetes will automatically schedule containers based on resource requirements and availability, packing them efficiently onto available nodes.

Auto-scaling – Kubernetes allows scaling up or down based on metrics like CPU usage. This ensures we have just enough resources to meet demand.

Service discovery – Containers can easily find and talk to each other using Kubernetes services for discovery. This simplifies things and avoids manual IP address management.

Overall, Kubernetes gave us the flexibility and control we needed to maximize resource efficiency, optimize hardware utilization, and achieve scalability on demand. This in turn minimized idle capacity and helped us reduce infrastructure costs.

Cluster Autoscaler (CA)

The CA takes autoscaling a step further by managing the number of nodes in your Kubernetes cluster. If your cluster is running out of resources due to increased demand, the CA can automatically add new nodes to the cluster. Similarly, if the demand drops and there are unused nodes, the CA can remove them, reducing infrastructure costs.

The key benefits of the CA are:

Improved application availability – By automatically adding nodes when resource constrained, the CA prevents application downtime.

Optimized costs – Only running the number of nodes required to meet demand reduces infrastructure costs.

Automated management – No need for manual intervention to scale the node pool up and down.

The CA allows Kubernetes clusters to automatically scale based on actual resource usage metrics. This ensures high application availability while optimizing infrastructure costs.

Horizontal Pod Autoscaler (HPA)

The HPA is responsible for automatically adjusting the number of pods in a deployment or replica set based on the observed CPU usage or custom metrics. This means that if your application is experiencing a sudden spike in demand, the HPA can scale up the number of pods to handle the increased load. Conversely, if the demand drops, the HPA can scale down the number of pods, reducing resource consumption and cost.

‍The HPA operates by periodically checking the current resource usage against the target resource utilisation. If the observed utilisation deviates from the target, the HPA adjusts the number of replicas accordingly. You can also configure the HPA to scale based on custom metrics, giving you even more control over your application’s scalability.

Vertical Pod Autoscaler (VPA)

While the HPA focuses on scaling the number of pods, the VPA is all about adjusting the resource limits for individual containers within a pod. This means that if a container is running out of memory or CPU, the VPA can automatically increase the resource limits, allowing the container to continue functioning without disruption.

‍The VPA operates by monitoring the resource usage of containers and comparing it to the current resource limits. If the observed usage is consistently higher or lower than the limits, the VPA recommends new resource limits for the containers. In some cases, the VPA can also automatically apply these recommendations, ensuring your application always has the right amount of resources

Spot Instances: For non-critical workloads and batch processing tasks, we utilized Spot Instances to take advantage of unused capacity at a fraction of the cost. This flexible approach helped us optimize costs while maximizing resource utilization.

KEDA Implementation

The Kubernetes pods were enabled to perform Horizontal Pod Autoscaling (HPA) based on CPU and memory utilization. The customer wanted to scale the Kubernetes pods to meet the requests coming in for deployment. This is similar in requirement to the native AWS auto-scaling behavior dependent on “requests per target group”

  • Event-Driven Scaling: It enables automatic scaling of Kubernetes pods based on the number of events in event sources such as message queues (e.g., AWS SQS, Kafka)
  • Scaling to Zero: It allows your Kubernetes pods to scale down to zero when there are no incoming events. This capability is crucial for serverless and event-driven architectures, where resources should only be allocated when there’s actual work to be done. Scaling to zero helps save costs and resources during idle periods.

Kubernetes Kustomize

Kubernetes Kustomize allows you to define and manage variations of Kubernetes configurations for different environments, such as development, staging, and production. This flexibility ensures that resources are provisioned appropriately for each environment, avoiding over-provisioning and unnecessary costs.

For example, you can use Kustomize to create customized Kubernetes manifests for your dev, test, and prod environments. The dev manifests may specify less compute resources, while the prod ones provision more resources to handle production workloads.

Kustomize lets you reuse common configuration components across environments while varying environment-specific settings like replica counts, memory/CPU limits, etc. You don’t have to maintain separate YAML files for each environment.

Instead, you can create a common base and overlay customizations for each environment. Kustomize will then generate the final manifests for you by merging the base and overlays.

This approach streamlines configuration management and ensures consistency across environments. By tailoring configurations to the specific needs of each environment, Kustomize helps optimize resource utilization and ultimately contributes to cost management in Kubernetes deployments.

ArgoCD:

ArgoCD indeed plays a significant role in cost optimization within Kubernetes environments. By automating the deployment and management of applications, ArgoCD reduces the reliance on manual intervention, thereby minimizing human errors and the associated costs of troubleshooting and rectifying them. Additionally, ArgoCD facilitates continuous delivery, ensuring that deployments are efficient, reliable, and consistent across different environments. This automation not only saves time but also optimizes resource utilization by enabling faster rollouts and updates. Overall, ArgoCD contributes to cost optimization in Kubernetes deployments by streamlining the deployment process, reducing operational overhead, and improving overall resource efficiency.

Overall, Terraform has been a huge win in terms of flexibility, productivity, and cost management. The key takeaway for readers is to invest time in learning Infrastructure as code practices and tools like Terraform. The long-term benefits are well worth it, especially as complexity and scale increase.

Seamless data migration by LINK for leading domain registrar

Seamless data migration by LINK for leading domain registrar

Overview

LINK recently undertook an ambitious project for one of the globe’s most renowned domain registrars and hosting platforms, with more than 20 million users and a diverse portfolio, including a comprehensive accounting system serving over 35,000 merchants globally.

The Challenge

In its journey towards technological advancement, the client decided to replace its existing online accounting solution with a more advanced system, developed by a financial software frontrunner. Ensuring a smooth transition for the users was paramount, necessitating a guided migration process with minimal disruption and an intuitive, integrated user experience.

The Solution

LINK developed an innovative migration tool embedded within the client’s dashboard. This tool not only informed merchants of the impending change but also facilitated the transition to the new accounting system without requiring extensive input from the users. LINK’s expertise in data mapping and migration was pivotal in transferring vast amounts of data from the old to the new system, culminating in a comprehensive report for each merchant.

The Result

The solution was a resounding success, with over 600 migrations completed within the first five hours post-launch. Ultimately, all merchants smoothly transitioned to the new system within 3 months, a significant achievement given the scale of the project. The entire process was achieved with 100% automation (no touch) and zero phone support, which was a first in the industry for a migration of this scale. This milestone marked a first in the industry for a migration project of this magnitude.

Following this successful migration, LINK continues to work with the client, creating further integrations between their business solutions and the new accounting system.

Scaling Payment Solutions for Global Markets: Challenges, Opportunities, and the Role of Robust Integration

Scaling Payment Solutions for Global Markets: Challenges, Opportunities, and the Role of Robust Integration

In the complex world of the global financial ecosystem, payment solutions serve as the intricate threads binding consumers and businesses. As digital transactions weave their way into every facet of our lives, scaling payment solutions to cater to diverse global markets becomes both an imperative and a challenge.

When I founded Link, it was with the recognition of the need for seamless integration in an increasingly interconnected world. Now, as the pace of globalization accelerates, payment providers find themselves navigating the challenging waters of regional regulations, varied consumer preferences, and the ever-present demand for security and speed.

Diverse Challenges in Diverse Markets

Each global market has its idiosyncrasies. While one region might prioritize the swiftness of a transaction, another may place a premium on multi-layered security checks. Some areas of the world still grapple with the challenges of internet connectivity, while others are pioneering the frontier of cryptocurrency transactions. A solution that works flawlessly in the bustling markets of Tokyo might falter in the rural landscapes of sub-Saharan Africa.

Embracing Integration for Seamless Expansion

For payment providers, the key to maneuvering these challenges lies in the power of robust integration. A well-integrated payment system ensures adaptability. It can smoothly align with regional banking systems, local e-commerce platforms, and consumer preferences, ensuring businesses can confidently step into new markets.

At LINK, our focus has always been on creating integration solutions that act as enablers. In the world of payments, this means ensuring that providers can expand their reach without being bogged down by the technical intricacies of each new market. By acting as the seamless bridge between disparate systems, robust integration ensures that payment solutions can be as global or as localized as necessary.

Opportunities Amidst Challenges

Despite the inherent challenges, the global market presents unparalleled opportunities. As emerging markets come online, there’s a vast demographic waiting to be tapped. For the discerning payment provider, each challenge in a new market can be flipped into an opportunity with the right integration strategy.

Concluding Thoughts

The future of payment solutions is not just digital; it’s global. As we stand on the cusp of this exciting new era, my journey with Link has reinforced my belief in the transformative power of integration. To my peers in the payment industry, as you chart your path across global markets, remember that robust integration might just be your most trusted ally.

LINK 2023 team offsite in Phuket, Thailand

LINK 2023 team offsite in Phuket, Thailand

The annual offsite trip is the most exciting event of the year for our team at LINK!. To celebrate the end of 2023 and kickstart plans for 2024, our distributed team across the world gathered in Phuket, Thailand for a 6-day bonding adventure in December. 

The purpose of the company-sponsored offsite trip is to bring the team together outside of the office for quality bonding time. With people coming from different offices and countries, the trip facilitates relationship-building across teams and strengthens the LINK culture.

Over 6 jam-packed days, we shared experiences and made memories to last a lifetime. From exploring idyllic islands to taking in cultural shows, Phuket delivered nonstop engagement. The trip brought us closer together, energized us for the new year, and strengthened the bonds between colleagues.

Day 1 

The first day of activities in Phuket started with everyone getting settled into the hotel after our morning arrival flight. We had some free time to relax at the pool and beach before our exciting evening plans.

In the evening, the group headed to Dolphin Bay for an amazing dolphin and sea lion show. We got front-row seats to watch the dolphins and sea lions leap, flip, and show off an array of tricks with their trainers. The dolphins splashed the crowd with water getting squeals of delight. The sea lions performed clever circus-style balancing acts. It was an unforgettable experience getting to see these intelligent marine mammals up close.

After the unforgettable dolphin show, we decided to explore the streets of Phuket to try the local Thai cuisine.  Sharing stories and laughs together on the first evening set the tone for an amazing trip.

 After dinner, we headed back to the hotel feeling excited for the adventures that lay ahead.

phuket-group-trip

Day 2 

On the second day of the trip, the team headed out for an exciting full day by speed boat to Phi-Phi islands. The tour included visits to some of the most iconic spots that Phi Phi Islands are famous for:

Maya Bay – The pristine stretch of white sand beach made famous by the Leonardo DiCaprio movie The Beach. Despite the crowds, it was a breathtakingly beautiful spot.

Loh Samah Bay- A quiet and secluded bay perfect for swimming in turquoise waters. The beach has soft white sand and tropical foliage coming down to the shoreline. 

Viking Cave – A unique cave inhabited by swifts who make their nests high up in crevices. Local fishermen climb bamboo scaffolds to harvest the bird nests which are used to make the expensive Chinese delicacy, bird’s nest soup.

After a packed morning of island hopping and sightseeing, the group enjoyed a relaxing lunch with a local Thai menu on Phi Phi Island before returning to the Phuket hotel. To wrap up another wonderful day, the team went out together for a group dinner in the evening.

Day 3

On Day 3 of the trip, the group embarked on the James Bond Island tour by speedboat. This was an exciting day exploring some of Phuket’s most famous islands and beaches. 

The first stop was Panak Island, known for its distinctive shape that resembles an upside-down saucepan. We had some time to take photos before heading to the next stop. 

After Panak, we arrived at Lagoon Beach on Phang Nga Bay. Here some people went for a refreshing swim in the emerald green waters. We then continued to explore the lush mangrove forests, taking in the unique scenery and ecosystems. Our guide explained interesting facts about the mangroves and pointed out ancient cave paintings along the shoreline.

The tour provided a delicious local Thai lunch, giving us a taste of authentic regional cuisines. After refueling, we headed out to sea kayak around the stunning limestone islands of Hong Island. It was a scenic paddle as we meandered through sea caves and rock formations jutting out of the water.

Our final stop was Lawa Island, where some people opted to do more swimming and snorkeling. The island has pristine white sand beaches and clear blue waters teeming with tropical fish. 

After an active day on the water, we headed back to our hotel in Phuket to clean up. In the evening the group went out together for dinner at a popular local restaurant, capping off another memorable day of sightseeing and adventure.

Day 4 

On the fourth day of the trip, we explored Phuket City. Our first stop was the famous Karon viewpoint, where we took in the breathtaking sights of the city, beaches, and bay area. 

After enjoying the views, we headed to Chalong temple. The temple is one of the most revered Buddhist temples in Phuket. We were able to observe the devoted worshippers and intricate architecture.

Next, we visited some lively souvenir shops selling everything from t-shirts to decorations to local foods and sweets. It was interesting browsing the stalls and markets.

A highlight of the day was visiting the iconic Big Buddha statue. The massive white marble statue sits high on a hilltop, towering over the island. We were impressed by the size and intricate details of the figure. 

After sightseeing, we enjoyed a group lunch together at a local restaurant. It was nice to relax and share stories over delicious Thai food. 

To end our last day, we attended the Phuket Fantasia show and buffet dinner. The carnival-style show featured traditional dances, acrobatics, martial arts, and more. The buffet offered a wide array of Thai delicacies. It was a fitting final evening for our trip.

Overall, our tour of Phuket city allowed us to experience the culture, landmarks, and flavors that make the area so lively and charming. It was a relaxing yet adventure-filled way to conclude the offsite visit. This offsite trip to Phuket is organized by LINK! turned out to be a great team bonding and memorable experience for all the team members. 

Over the 4 days, there were many fun activities planned for the group that brought everyone together and helped strengthen relationships outside of the workplace. From island tours to shows and local experiences, it was nonstop engagement.

The shared experiences like swimming, kayaking, or even just dining together allowed colleagues to see different sides of each other. Many new friendships were formed through the trip that will continue back at work.

Looking back, the trip will be remembered fondly by all who attended. The pictures and stories will linger as a highlight of their time at the company. It was so valuable to give this dedicated team a chance to play together.  

The change of scenery and barrage of activities allowed everyone to hit the reset button. They returned energized and excited about their work.

This kind of shared experience is a true bonding moment. The trip brought the LINK! family closer together through unforgettable memories. It was a rewarding investment that will continue paying dividends moving forward.

LINK’s data migration services now on Lightspeed Marketplace

LINK’s data migration services now on Lightspeed Marketplace

LINK’s historical data migration services are now available on the Lightspeed application marketplace for Lightspeed X-Series. This marks a significant step in our partnership with Lightspeed, demonstrating our commitment to helping businesses integrate their applications more quickly and simply.

Why choose LINK for your Lightspeed X-Series migration?

Transitioning to a new system like Lightspeed X-Series is a big step for any business. With LINK, Lightspeed users can make this transition smooth and efficient. Our expertise in data migration ensures that your valuable historical sales data is transferred seamlessly to your new X-Series account, allowing you to maintain continuity and make informed decisions for your business growth.

Our services offer:

  • Seamless Transition: We ensure that your historical data is perfectly integrated with the Lightspeed X-Series, maintaining its accuracy and integrity.
  • Data Security: Handling your data with the highest level of care, we adhere to the best industry practices and compliance standards to keep your information secure.
  • Minimized Downtime: Understanding the importance of continuous operation, we work diligently to minimize disruptions to your business during the migration process.
  • Customized Solutions: Every business is unique, and so are your data migration needs. Our services are tailored to meet these specific requirements.
  • Ongoing Support: Our commitment to your success doesn’t end with the migration. We provide continuous support and guidance to ensure smooth operation and utilization of your historical data.

Empower your business with LINK

Whether you’re a retailer, a restaurant owner, or an entrepreneur, LINK’s Historical Data Migration Services for Lightspeed X-Series are designed to enhance your operational efficiency and data management capabilities. Embrace the power of your historical data and drive your business forward with confidence. For more information and to get started with LINK on Lightspeed X-Series, visit Lightspeed