Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

AWS Serverless Scaling Considerations for API Gateway


Scaling Considerations for API Gateway

There are several methods to integrate managed services and serverless apps.

To scale a serverless architecture, you must understand the capabilities and restrictions of the services you integrate.

Timeouts, retrying, and payload size are important factors.

Tips to optimize your serverless architecture are:

  • Trade-offs and optimizations
  • End-to-end load testing
  • Keep up with service changes and enhancements

Scaling Considerations for API Gateway Video

W3schools.com collaborates with Amazon Web Services to deliver digital training content to our students.


How API Gateway Works

Assume you have a proof of concept for order processing procedure.

API Gateway is your front door, and you may configure each API to control the access pattern you expect.

Set up an edge-optimized endpoint with built-in CloudFront distribution to deliver content quickly to global clients.

The optional cache helps minimize backend hits.

You might also use API keys and usage plans to limit requests per client.


Lambda Authorizers

The Lambda authorizers can help you scale your app with API Gateway.

They allow you to create a custom authentication process.

From Lambda's perspective, the authorizer function is just another function.

The authorizer's call counts towards total concurrency.

Using Lambda authorizers requires anticipating the number of authorization requests.

Enable auth caching to prevent the authorizer function from being called again by returning users.

You can cache authorizations for 5–60 minutes.

API Gateway also enables direct AWS service interfaces like Step Functions.

You need to think about how many queries per second your API can handle.


Best Practices

Avoid developing for perpetual scalability by knowing your company's fundamental drivers.

Examine the business effect of the percentile rather than the sheer number of mistakes.

If the business effect is minimal, go with the simpler solution.

You must identify and remove blockages across the application to improve overall flow.

Keep up with service changes and enhancements.

Consider the payload limit of each service integration.

For greater payload, implement a claim check pattern.


Related reads:

Amazon API Gateway Limits and Important Notes

AWS Serverless Exercises

Test Yourself With Exercises

Exercise:

What The Lambda Authorizers help you create?

Custom   calls

Start the Exercise