Microservices let teams split a large application into smaller, independent services that can be built, deployed and scaled separately. PHP teams using Laravel have long asked whether to build those services with full Laravel or its lightweight micro-framework, Lumen. In 2026 the answer has changed, so this guide explains where Lumen stands today and how to build fast, lean microservices with Laravel.
Quick answer: use Laravel for new microservices. The Laravel team no longer recommends starting new projects with Lumen: PHP itself has become much faster, Laravel can be trimmed down for API-only services, and Laravel Octane delivers far better performance than Lumen ever did. Lumen is still found in older systems, and those services are worth planning to migrate to Laravel.
Lumen vs Laravel at a glance
| Lumen | Laravel | |
|---|---|---|
| Status | Legacy; not recommended for new projects | Actively developed, yearly major releases |
| Purpose | Minimal micro-framework for APIs | Full framework that also works for lean API services |
| Performance | Fast on traditional PHP-FPM | Fast with PHP-FPM; much faster with Laravel Octane |
| Features | Routing, Eloquent (optional), queues, basic auth | Full ecosystem: Sanctum, Passport, Horizon, Octane, Pulse, Scout, Reverb and more |
| Ecosystem support | Many packages no longer support it | Supported by nearly all Laravel packages |
| Recommendation | Maintain or migrate | Use for all new services |
The rise of microservices architecture
Traditional monolithic applications become harder to change as they grow: new features touch shared code, one slow component affects everything and deployments become risky. Microservices split an application into services that each own one business capability, such as orders, payments, notifications or search, and communicate through APIs or message queues. Each service can be scaled, updated and deployed independently.
Microservices also add complexity: network calls, distributed data, monitoring and deployment pipelines for every service. Many teams start with a well-structured modular monolith in Laravel and extract services only where independent scaling or ownership clearly pays off.
Free resource
Upgrade and patching checklist
Want this applied to your project? Our engineers will send it with notes for your stack.
Why Lumen was popular, and why it is no longer recommended
Lumen was created when PHP 5 and early PHP 7 made framework boot time a real cost. By loading fewer components, Lumen could answer simple API requests faster than full Laravel.
Since then:
- PHP 8.x is dramatically faster, with OPcache, preloading and JIT.
- Laravel Octane keeps the application in memory (using FrankenPHP, Swoole or RoadRunner), so the framework boots once instead of on every request. That removes the overhead Lumen was designed to avoid.
- Laravel’s API features (API resources, Sanctum, rate limiting,
php artisan install:api) make lean API services easy to build. - Lumen’s own documentation now advises using Laravel instead for new projects, and Lumen has not kept pace with Laravel’s major releases.
Laravel for microservices
Laravel is a strong fit for microservices because it combines a lean API setup with a rich, well-supported ecosystem:
- API development: routing, validation, API resources, versioning and rate limiting.
- Authentication between services: Sanctum tokens, Passport (OAuth 2.0), or JWT verification for tokens issued by an identity provider.
- Asynchronous messaging: queues backed by Redis, Amazon SQS or RabbitMQ (via packages), with Horizon for monitoring.
- Performance: Octane for high-throughput services, caching with Redis, and database read replicas.
- Real-time events: Reverb for WebSockets.
- Observability: logging, Pulse for performance insights, and integration with tools such as Sentry, OpenTelemetry-based tracing or Laravel Nightwatch.
- Community and support: extensive documentation, packages and developers who already know the framework.
Designing Laravel microservices well
- Define service boundaries by business capability, not by technical layer.
- Give each service its own database (or schema) to avoid hidden coupling.
- Use synchronous APIs only where needed; prefer events and queues for workflows between services.
- Make operations idempotent so retried messages do not create duplicates.
- Use an API gateway for routing, authentication and rate limiting at the edge.
- Standardise logging, tracing and health checks across all services.
- Containerise services with Docker and deploy with Kubernetes, ECS or a managed platform such as Laravel Cloud.
Deploying and scaling Laravel microservices
Laravel services run well in containers on Kubernetes or Amazon ECS, on managed platforms such as Laravel Cloud and Laravel Forge-provisioned servers, or serverless on AWS Lambda using Laravel Vapor or Bref. Scale stateless API services horizontally behind a load balancer, scale queue workers separately from web traffic, and use Octane where response time and throughput matter most.
Migrating from Lumen to Laravel
If you still run Lumen services, migrating is usually straightforward because Lumen shares much of Laravel’s code:
- Create a new Laravel application on a current, supported version.
- Move routes from Lumen’s
$routerdefinitions to Laravel route files. - Move controllers, models, jobs, events and middleware, updating namespaces where needed.
- Replace Lumen-specific bootstrap code (
bootstrap/app.phpservice registration) with Laravel service providers and configuration. - Re-enable facades and Eloquent as needed, and move environment configuration.
- Run your test suite and contract tests against the new service, then switch traffic gradually.
Frequently asked questions
Is Lumen deprecated? Lumen is no longer recommended for new projects. The Laravel team advises using Laravel, optionally with Octane, instead.
Is Lumen faster than Laravel? On traditional PHP-FPM, Lumen had less overhead. With modern PHP and Laravel Octane, Laravel is typically faster in real-world API services.
Can Laravel be used for microservices? Yes. Laravel works well for API-only microservices, with queues, events, Sanctum or Passport authentication, Octane for performance and container-friendly deployment.
Should I convert my monolith to microservices? Only when there is a clear benefit, such as independent scaling or team ownership. A modular monolith is often simpler and cheaper to run.
Build scalable Laravel services with Vibidsoft
Vibidsoft Pvt Ltd designs and builds Laravel APIs and microservices, migrates Lumen services to Laravel, and sets up Octane, queues, containers and cloud deployment. See our Laravel development services or contact us to discuss your architecture.
