RomanPierce
RomanPierce

Reputation: 17

Laravel Vapor API connected to Python script (scaling issues)

I currently have an API that is based on Laravel Vapor (AWS Lambda), and each API call needs to call another Lambda, that has a Python script on it. The execution of that Python Lambda might take anywhere from 3 seconds to 2 minutes and has to be on-demand (meaning no queues).

The issue I'm facing right now is that:

  1. Concurrency limit defaults to 1000, and is applied to all Lambdas together
  2. Since one Lambda hosts the Laravel, and it calls the second Python Lambda, it means the concurrency is then 500 for each of them, and it also costs double, since the Laravel Lambda needs to wait for the Python one

What would be the best approach to deal with this, cut the costs and also scale indefinitely?

Upvotes: 0

Views: 31

Answers (0)

Related Questions