Eclayaz
Eclayaz

Reputation: 77

What's the best server solution to handle high traffic?

The requirement

There should be a web service where it inserts some data into a table. The service should be able to handle 800 to 900 requests per second. Simply we get a POST request so we insert the data in to a table.

The solution we came up

We thought of go with Amazon serverless solutions - AWS Lambda

Can our solution achieve the requirements, any bottlenecks in the process or the services we use??

Is there any better solutions to handle this kind of a traffic?

Additional requirements

We need to analyze our data which we collect through our Lambda function. For that we are planning to move the data into a different table and this data migration part happens once a day (probably during the off-peak). What's the best way to handle this data migration?

Upvotes: 0

Views: 924

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 270164

It appears that your design is API Gateway -> Lambda -> Database.

Amazon API Gateway is highly scalable and will meet your needs easily. You could also implement throttling rules to make sure that clients are not abusing your API.

AWS Lambda is also highly scalable. There is a default limit of 1000 concurrent Lambda function executions, but they will automatically queue if this amount is exceeded (eg if your function takes several seconds to complete).

In general, SQL databases have no guarantee of performance. A query can be simple or complex and it is hard to predict the performance without running lots of load tests.

However, Amazon DynamoDB is a NoSQL database where you can configure exactly how many Reads and Writes per second you require. It also allows limited burst above this limit and the ability to Auto Scale to vary performance throughout the day.

The downside is that it is difficult to performance analysis on data in a NoSQL database, so you would want to export it to either a traditional SQL Database (eg MySQL) or into an ELK stack on Amazon Elasticsearch Service.

Upvotes: 3

Related Questions