Hey folks,
I'm working on an app that makes a longer-running (couple of seconds) HTTP request from a controller upon user action (e.g. the user clicks a button, it then triggers a livewire action which does an external HTTP request). My concern is that I'm blocking a process with this and that it wouldn't scale well. What's the best practice here? Is there an async option, or should I maybe turn this into an artisan command and spawn it as an async process?
Thanks in advance
For clarification: if it was Go, I'd be using a goroutine, and if it was Python, I'd use aiohttp - that's the kind of solution I'm potentially looking for.
Also, I was thinking that eventually as it scales I'll need to respect the external API's rate limit, so maybe the best way is to already turn this into a job with a worker pool. I'm new to Laravel, and I'm not sure if this is the canonical way.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community