How Simplifying Our Architecture Saved Us Thousands Monthly – The New Stack

This is the second of two parts. Read Part 1: Beyond Terraform: How We Scaled DevOps.

My team is not alone in facing challenges in the quest for efficient DevOps. The complexity of cloud development and deployment are like chains, anchoring many of us down and making it tough for our teams to soar to new and innovative heights.

At Drop Bio Health, an at-home digital health company, we grappled with the unwieldy beast that was Terraform and ultimately decided to revamp our DevOps approach and deployment pipeline using the Nitric framework (described in my previous article). This single action resulted in significant gains in developer productivity and our ability to deliver business value.

As part of this process, we revisited our project architecture and achieved valuable improvements to our deployment capabilities and cost efficiency. (Spoiler alert: We saw a 60% reduction in AWS hosting costs.) Heres our journey from our original architecture to a simplified approach that will serve our team even better as we scale.

The original architecture for our WellBeing test was designed for scalability and agility. We used number of well-known, best-in-class tools.

There was nothing technically wrong with this architecture; in fact, these were configurations we had seen used in other modern cloud infrastructures and heavily documented in how-to guides for achieving scalability, redundancy and flexibility.

The challenge was that manually deploying this required our developers to be extremely familiar with each resource. For instance, the configuration of an Elastic Load Balancer (ELB) involves managing security groups, setting up listener rules, conducting health checks through target groups and integrating SSL certificates. When incorporating Auth0 into the mix, the configuration also required specialized routing and additional middleware for token validation, ensuring that authentication and authorization processes were seamlessly integrated.

Virtual private clouds (VPCs) required correctly setting up Classless Inter-Domain Routing (CIDR) blocks, sidestepping any overlaps and judiciously designating public and private subnets. This required ensuring the security groups were structured correctly to allow only necessary ports and manage ingress and egress rules. In cases where there was a need for communication with other VPCs, managing peering relationships was crucial.

For a company with a limited operations team, the cognitive load grew to become a burden on our efforts to work on our core services.

We needed to make it easier for our team to manage infrastructure and our deployment process. Though we had access to a plethora of tools, we wanted to find a way to achieve our constant goals of scalability, redundancy and flexibility with only the necessary pieces. Could we use fewer tools to minimize maintenance, lower cognitive load and still have confidence in our architectures future-proofing?

As we adopted Nitric for infrastructure provisioning, we not only streamlined our infrastructure, but did so using tools that have been vetted by industry experts. Our new architecture centers our operations around the robust capabilities of AWS API Gateway and Lambda functions.

AWS API Gateway has become a cornerstone of this architecture because of several distinctive features:

API Gateway serves as a single, consolidated entry point for all incoming traffic. This eliminates the need for managing multiple endpoints or load balancers like ELB, as the API Gateway can distribute incoming requests to multiple backend services, including Lambda functions, efficiently.

Paired with serverless solutions like Lambda, API Gateway can automatically scale based on the incoming traffic. This dynamism allows it to accommodate sudden spikes or lulls in demand without any manual intervention, rendering traditional scaling mechanisms provided by virtual private cloud (VPC) and network address translation (NAT) gateways unnecessary.

API Gateway inherently offers robust security features like AWS Web Application Firewall (WAF) integration, throttling and built-in authentication and authorization mechanisms. This negates VPCs requirement for added security layers, as one can directly integrate custom authorizers or platforms like Cognito for user authentication.

With API Gateway, the need to manage intricate networking setups using VPCs or ensure outbound traffic with NAT gateways is significantly reduced. The gateway handles the complex networking tasks, allowing developers to focus on building and deploying applications.

In essence, by centering our architecture around API Gateway and Lambda functions through Nitric, weve not only achieved a more streamlined infrastructure but also capitalized on the intrinsic efficiencies and features these services offer, eliminating the need for components like ELB, VPC and NAT gateways.

Since API Gateway and Lambda functions follow a pay-as-you-go model, there are cost savings compared to maintaining always-on resources like ELB or NAT gateways. Plus, the ability of API Gateway to scale down to zero means no incurred costs when theres no traffic. In our case, this had a significant impact on our monthly AWS hosting costs: Weve cut them by 60% as a result of this architectural shift.

Our transition from manual cloud deployment to a simplified and automated architecture has streamlined our operations significantly. Weve replaced complex components like ELB, VPC and NAT gateways with API Gateway and Lambda functions, resulting in:

Notably, this transition has led to substantial cost savings due to the pay-as-you-go model and the ability of API Gateway to scale down to zero during low-traffic periods. This shift allows us to allocate resources more efficiently, focusing on innovation and customer solutions.

All in all, simplifying our architecture was a big win for our team. If youre interested in reading more about our Nitric implementation, check out the case study and take a look at its technology.

YOUTUBE.COM/THENEWSTACK

Tech moves fast, don't miss an episode. Subscribe to our YouTube channel to stream all our podcasts, interviews, demos, and more.

SUBSCRIBE

Go here to read the rest:
How Simplifying Our Architecture Saved Us Thousands Monthly - The New Stack

Related Posts

Comments are closed.