Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Microservices with Laravel Lumen
Search
Mathias Hansen
November 18, 2015
Technology
2.9k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Microservices with Laravel Lumen
PHP World 2015
Mathias Hansen
November 18, 2015
More Decks by Mathias Hansen
See All by Mathias Hansen
Launching & Scaling a Side Project
minicodemonkey
3
1.2k
Other Decks in Technology
See All in Technology
AIで仕事のやり方を変える
matsu7874
3
1.1k
安心して変更できるWebフロントエンドの作り方
pirosikick
3
870
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
330
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
1
500
GoにおけるFFIのこれまでとこれから
goccy
5
2.5k
コーディングエージェントでM5Stack系の開発を少し試した時の話 / M5 Japan Tour 2026 Autumn 東京
you
PRO
0
170
From Vanilla Kubernetes to a Batteries-Included Platform: Developer Experience at 1,300+ Clusters
yosshi_
0
680
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
コスト最適化の「めんどくさい」を AWS FinOps Agent でチョット楽にする
classmethod_kaz
0
320
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
900
消えない 動かない 効かない
yama3133
1
100
Podは生きているのにGoだけが落ちる:GOGCとGOMEMLIMITで追うInvisible OOM Killの謎
tkc66buzz
1
530
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
520
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
460
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
4 Signs Your Business is Dying
shpigford
187
23k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.7k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
620
How STYLIGHT went responsive
nonsquared
100
6.3k
Transcript
Microservices with Laravel Lumen by @MathiasHansen php[world] 2015
Who I Am » I speak English, Danish, and PHP
» Have done so for most of my life » Self-proclaimed Laravel evangelist » Started Capital Laravel Group in 2013
What I Do
What We're Going to Do » Microservices, defined » How
we're using Microservices at VB » Benefits and drawbacks » Microservices with Lumen » Questions
What's a Microservice?
A Microservice should be Designed around a single business capability
None
None
We have... » A big monolithic app » A growing
team » Concerns mostly separated » Let's go one step further
! Microservices ! to the rescue
None
Implementing a Microservice
None
Define a contract » REST? » Protobuf? » SOAP? (please
don't do this)
Plan ahead » How big should your service be? »
How many services should you have? » Share common code across services » use composer
Use an API Manager » api.videoblocks.com/search ➡ searchservice.internal » api.videoblocks.com/abtest
➡ abtestservice.internal » Authentication » Rate limiting » Usage tracking
A Microservice Hybrid or go all the way? » Monolithic
app + Micro services » Static Frontend + Micro services » PHP Gateway + Micro services
Immediate benefits
Teamwork, simplified » Can use any programming language or data
store under the hood » A small team can own the entire process from dev to deployments » Great for onboarding
Deployments, simplified » Deploy a "piece" of the app instead
of full monolith » Independent deployment schedule
Testing, simplified » Unit test » Internal functionality » Integration
test » External interface » Load test » Ability to test each service individually
Scaling, simplified Allocate extra resources to the service that needs
it » Isolate hot/cold zones
Hold your horses
None
Things to Consider
Complexity » Increases complexity of your app » Network overhead
» More planning necessary
How big is your team?
Automation is key Development ➡ testing ➡ deployment
None
What is Lumen?
A microframework » But not necessarily in the traditional sense
» Based on Laravel components » Follows Laravel versioning » Laravel Lumen 5.1 ➡ Laravel 5.1
It still packs a punch » Blade (templating) » Caching
» Commands » Controllers » Eloquent ORM » Dependency Injection » Queueing » Testing » And more...
If you're familiar with Laravel, you already know how to
use Lumen.
Lumen is fast
No, seriously! It's kind of the point
Faster routing + Opt-in rather than opt-out = Smaller footprint
out of the box
Routing » Uses nikic/FastRoute for routing » You don't need
a fancy C extension to make routing fast
Opt-in » Core features has to be explictly enabled: »
dotenv, facades, Eloquent ORM, etc. » Service Providers » Middlewares » CSRF protection, cookie encryption, session handling etc.
What is Lumen not? » Does not support Laravel 5
packages » Very minimal config system out of the box » Uses environment variables » Can use full config system if you want » Router has fewer features
Use cases
Use it for Microservices duh!
Tiny websites Status page, landing page Example: status.geocod.io
High-traffic component of your website Example: Envoyer cron job heartbeat
The competition
Conclusion » Define your contract first » Design your microservice
around a single business capability » Plan ahead » Define testing & deployment strategy » Use Lumen for microservices or other small standalone apps
Additional resources Building Microservices by Sam Newman Martin Fowler's Articles
http://martinfowler.com/articles/microservices.html Taylor Otwell's Lumen Laracasts https://laracasts.com/lessons/introducing-lumen
Questions? Talk to me @MathiasHansen
[email protected]