Microservices Architecture for Laravel.

Published 2 months ago by stargatesg1

Is it possible to use Laravel in a Microservices Architecture? Would it be better to use Lumen. I find that the development of Lumen is very focused and slow.

martinbean

Is it possible to use Laravel in a Microservices Architecture?

@stargatesg1 Yes.

Would it be better to use Lumen

@stargatesg1 Depends on your needs. If speed, then possibly. But if you need components Laravel has that Lumen doesn’t, then possibly not.

stargatesg1

My only concern is performance. Can Laravel scale to a larger application with multiple users.

martinbean

@stargatesg1 Laravel is just a PHP framework. How it handles scale depends on the code you write on top of it, the load your application receives and the server architecture you have in place to handle that load.

LiamHammett

The general rule of thumb is: if you know you're going to need more than just Lumen for your application, then use Laravel.

If you're looking into running a Laravel application as a microservice, one of the problems you may run into is that the bulk of the response time will end up being the framework being booted.

Laravel News recently published an article on a package for Swoole that can help deal with this, it's worth checking out to see if it'll help you: https://laravel-news.com/laravel-swoole

Please sign in or create an account to participate in this conversation.