Optimizing Serverless With Apigee API: An Inside Look At Our Case Study

Name of the client: Trestleiq

Who contacted us from their side: CEO of Trestle

Problem Statement: In Trestle, there are many microservices, and their traffic was huge, from 20MM to 500MM queries expecting max 1000 QPS and Latency P95 should be 500 mSec.

Solution: In TrestleIQ, the requirement was very clear about infrastructure; considering the scalability, cost-effectiveness and performance, we opted for serverless architecture.

Serverless architecture with Apigee API
Serverless Architecture With Apigee API

Why serverless?

Serverless computing has several benefits compared to traditional cloud-based or server-centric infrastructure. For example, serverless architectures often provide the following:

✔️ Greater scalability,

✔️ More flexibility, and

✔️ A quicker time to release while being

✔️ More cost-effective.

Serverless architectures take away the headache of purchasing, provisioning, and managing backend servers. However, serverless computing is only a magic bullet for some web application developers.

What are the advantages of serverless computing?

1. No server management is necessary

Although ‘serverless’ computing does utilize servers in the background, developers using this type of architecture never have to manage or deal with them directly. Instead, they are governed by the vendor.

This can reduce the investment necessary in DevOps, which lowers expenses and frees developers to create and expand their applications without being constrained by server capacity.

2. Developers are only charged for the server space they use, reducing the cost

As in a ‘pay-as-you-go’ phone plan, developers are only charged for what they use. Code only runs when the serverless application needs backend functions, and the code automatically scales up as needed. Provisioning is dynamic, precise, and real-time. Some services are so exact that they break their charges down into 100 millisecond increments.

In contrast, in a traditional ‘server-full’ architecture, developers have to project in advance how much server capacity they will need and then purchase that capacity, whether they end up using it or not.

3. Serverless architectures are inherently scalable

Imagine if the post office could magically add and decommission delivery trucks at will, increasing the size of its fleet as the number of mail spikes (say, just before Mother’s Day) and decreasing its fleet for times when fewer deliveries are necessary. That’s what serverless applications can do.

Applications built with a serverless architecture will be able to handle increased traffic as your user base grows or usage increases. For example, if a function needs to be run multiple times, the vendor’s servers will start up, run, and end them as needed, often using containers. (The function will start up more quickly if it has been run recently – see ‘Performance may be affected below.)

As a result, a serverless application can handle an unusually high number of requests just as well as it can process a single request from a user. A traditionally structured application with a fixed amount of server space can be overwhelmed by a sudden increase in usage.

4. Quick deployments and updates are possible

Serverless architecture allows you to release a working application version without uploading code to servers or doing any backend configuration. Developers can very quickly upload bits of code and release a new product.

They can upload code all at once or one function at a time since the application is not a single monolithic stack but a collection of processes provisioned by the vendor.

This also makes it possible to quickly update, patch, fix, or add new features to an application. It is optional to make changes to the whole application; instead, developers can update the application one function at a time.

5. Code can run closer to the end user, decreasing latency

As the application is not hosted on an origin server, it can run its code from anywhere, which makes it more versatile and increases its potential user base. Therefore, depending on the vendor used, running applications functions on a server closer to the end user makes it possible to reduce latency.

This is because the requests don’t have to travel as far, and they can be processed more quickly. CDN enables this kind of serverless latency reduction.

What is Serverless?

Serverless is a term that refers to applications that don’t require a server. These types of applications don’t need any server provision and don’t require managing servers.

Using AWS Lambda means not having to worry about which AWS resources to launch or how you will manage them- even-driven, serverless computing is all taken care of by Amazon as a part of AWS. All you need to do is put your code on Lambda, and it will run.

Amazon Lambda is a great service for executing code in response to events from other Amazon services, such as HTTP requests from the Amazon API gateway. One thing to keep in mind, however, is that Lambda can only be used for background tasks- so there are better tools for some jobs.

AWS Lambda allows you to focus on your core product and business logic while it takes care of the following:

🔸 Managing operating system (OS) access control,

🔸 Patching,

🔸 Right-sizing,

🔸 Provisioning and

🔸 Scaling.

This can help you save time and resources to focus on what’s most important to your business.

The serverless framework

Build applications on AWS Lambda and other next-gen cloud services that auto-scale and only charge you when they run. This lowers the cost of running and operating your apps, enabling you to build more and manage less.

Seeking To Enhance Software Excellence And Dependability Through DevOps Solutions?

Apigee API Management

Build, manage, and secure APIs—for any use case, environment, or scale.

Google Cloud’s native API management to operate your APIs with enhanced scale, security, and automation.

Benefits of Apigee API
Apigee API Benefits

Key features of Apigee API

1. Orchestrate traffic in the most demanding applications with APIs

  • Build APIs to unlock data from any application, system, or service with a fully managed API gateway.
  • Implement any API architectural style (REST, gRPC, SOAP, GraphQL, and more) suitable for your application needs and development preferences.
  • Implement Apigee and Anthos Service Mesh to standardize and control communications between microservices.

2. Detect and mitigate security threats with advanced API security

Use Apigee’s Advanced API security capabilities to detect API configurations, malicious bot attacks and anomalous traffic patterns. API proxies that don’t meet security standards surfaced to identify misconfigured APIs or being accused.

Advanced API security regularly assess managed APIs and provides teams with a recommended action when configuration issues are detected. In addition, leverage Advanced API security’s preconfigured rules to identify malicious bots within API traffic quickly.

3. Deploy to any environment with consistent control and governance

Apigee hybrid gives you the architectural freedom to deploy your APIs anywhere- in your choice’s data centers or public clouds. By configuring Apigee, hybrid, you can host and manage containerized runtime services in your Kubernetes cluster for greater agility and interoperability.

Apigee also lets you manage APIs consistently across environments. Use API hub to catalog all enterprise APIs irrespective of where they are built, deployed, or managed—Apigee or otherwise. Govern APIs sprawling across various tools and environments consistently with self-service tools and open-source standards.

4. Create new revenue streams and ecosystems from your API products

You can build API products that address specific use cases by bundling individual APIs or resources into logical units. You can publish these API products in out-of-the-box integrated developer portals or custom Drupal experience.

To encourage the adoption of your API products, enable easy onboarding, secure access, and engaging experience without excessive overhead. Finally, define comprehensive rate plans to monetize your API products and unlock new revenue streams from your digital assets.

5. API-first integration with Apigee Integration

Apigee integration allows you to easily connect your existing data and application to access them as APIs. By surfacing these APIs, you’ll be able to power new experiences. With Apigee Integration, Google Cloud combines the best API management and integration in a unified platform. This platform uses cloud-native architecture principles so enterprise IT teams can scale their operations, accelerate developer velocity, and increase market speed.

coma

Conclusion

The use of Apigee API for serverless optimization has proven to be a highly effective solution in our case study. By streamlining and simplifying the management and deployment of serverless resources, Apigee API improved our infrastructure’s performance and efficiency significantly.

Content Team

This blog is from Mindbowser‘s content team – a group of individuals coming together to create pieces that you may like. If you have feedback, please drop us a message on contact@mindbowser.com

Keep Reading

Keep Reading

Launch Faster with Low Cost: Master GTM with Pre-built Solutions in Our Webinar!

Register Today!
  • Service
  • Career
  • Let's create something together!

  • We’re looking for the best. Are you in?