Skip to main content
Full Stack Radio

120: Taylor Otwell - Serverless Laravel with Vapor

61 min episode · 2 min read
·

Episode

61 min

Read time

2 min

Topics

Remote Work, Leadership, Software Development

AI-Generated Summary

Key Takeaways

  • Serverless Database Setup: Start with a $15/month RDS MySQL instance that can host multiple databases for different projects. Use DynamoDB as a free cache option instead of ElastiCache to avoid additional monthly costs. This setup provides managed backups and automatic updates without manual server maintenance.
  • Cold Boot Mitigation: Vapor uses concurrent warming by sending 10 simultaneous HTTP requests every five minutes to keep Lambda instances hot. AWS reduced VPC cold boots from 10 seconds to under 1 second recently, with plans to eliminate the penalty entirely in 2019, making private database connections faster.
  • Queue Concurrency Management: Set maximum queue concurrency below your database connection limit to prevent overload. A small RDS instance supports 100 connections, while larger instances handle 600+. Consider using DynamoDB for high-traffic endpoints to avoid MySQL connection limits, then process records asynchronously through queues.
  • Performance Optimization: Custom PHP runtimes with FPM and opcache reduced Lambda response times from 40ms to 5-6ms for basic Laravel requests. Configure web layer at 1GB RAM and queue layer at 512MB RAM. Since billing occurs in 100ms increments, lower memory settings save money without crossing billing thresholds.
  • Direct S3 Uploads: Stream files directly from frontend to S3 using pre-signed URLs instead of uploading through web servers. Vapor provides a hidden route that generates secure upload URLs and an NPM package with vapor.store method. This approach prevents security vulnerabilities and reduces web server RAM usage.

What It Covers

Taylor Otwell introduces Laravel Vapor, a serverless deployment platform for Laravel applications on AWS Lambda. The discussion covers serverless architecture, cold boot optimization, database configuration, queue management, file uploads, and cost comparisons with traditional VPS hosting.

Key Questions Answered

  • Serverless Database Setup: Start with a $15/month RDS MySQL instance that can host multiple databases for different projects. Use DynamoDB as a free cache option instead of ElastiCache to avoid additional monthly costs. This setup provides managed backups and automatic updates without manual server maintenance.
  • Cold Boot Mitigation: Vapor uses concurrent warming by sending 10 simultaneous HTTP requests every five minutes to keep Lambda instances hot. AWS reduced VPC cold boots from 10 seconds to under 1 second recently, with plans to eliminate the penalty entirely in 2019, making private database connections faster.
  • Queue Concurrency Management: Set maximum queue concurrency below your database connection limit to prevent overload. A small RDS instance supports 100 connections, while larger instances handle 600+. Consider using DynamoDB for high-traffic endpoints to avoid MySQL connection limits, then process records asynchronously through queues.
  • Performance Optimization: Custom PHP runtimes with FPM and opcache reduced Lambda response times from 40ms to 5-6ms for basic Laravel requests. Configure web layer at 1GB RAM and queue layer at 512MB RAM. Since billing occurs in 100ms increments, lower memory settings save money without crossing billing thresholds.
  • Direct S3 Uploads: Stream files directly from frontend to S3 using pre-signed URLs instead of uploading through web servers. Vapor provides a hidden route that generates secure upload URLs and an NPM package with vapor.store method. This approach prevents security vulnerabilities and reduces web server RAM usage.

Notable Moment

Otwell reveals that Laravel Forge runs on a single 4GB DigitalOcean server with CPU utilization typically under 10 percent, despite generating seven figures annually. This demonstrates how most Laravel applications are drastically overprovisioned, wasting resources on infrastructure capacity they never actually use in production environments.

Know someone who'd find this useful?

Episode Transcript

This episode of Full Stack Radio, I talked to Taylor Atwell about scaling Laravel with serverless on Laravel Vapor. This is Full Stack Radio episode 120. Hey, everyone. Welcome to another episode of the Full Stack Radio podcast. I'm your host, Adam Wadden. And today, it is my pleasure to welcome back to the show Taylor Atwell, the the creator of Laravel. How's it going, dude? Pretty good. How are you? I can't complain except for, a devastating Rocket League defeat that we just suffered. Other than that, things are going pretty well. We'll just pretend go on this podcast, pretend that never happened. Yeah. So the reason I want to have you on the show is, we just got back from Laracon, and you kind of finally announced this big kind of secret project you've been working on for the last six or seven months, which is Laravel Vapor. So what is kind of your pitch for Laravel Vapor? So Laravel Vapor is a a plat a way to ship out your Laravel applications out into production on a serverless platform, powered by AWS. So that means it runs on top of AWS Lambda, and it also gives you a nice interface for interacting with some other aspects of AWS, like databases, cache, sets up your queues and stuff for you, configures DNS records, certificates, all that good stuff. I think we interact with, like, 10 to 15 different AWS services. So it takes all the setting up a serverless application is actually really, really confusing, and I had to read a lot of documentation. So I just wanted to make the whole experience a lot smoother for Laravel devs so it's really easy to get started. Cool. So, for people who don't even know, like, what serverless even means, like, what is serverless, and why would you want to deploy your application to some sort of serverless platform? Yeah. So I think serverless means different things to different people, but I think they're, like, true serverless purists. It it means basically, auto scaling on demand, but also scaling down to zero. So that's a big, that's a big thing for, like, real serverless is that when you're not using it, you're generally not paying anything. So AWS Lambda works this way where they charge you in one hundred millisecond increments. DynamoDB, which is a serverless database, works this way where if you're not making any recent rights, you're not paying for anything except your data storage. So that that's, a big chunk of it. Then, of course, another part of it is just not worrying about the underlying infrastructure that your application is using. So for your application, you're not worried about, you know, I have four web servers and a load balancer and all of that, and they run Ubuntu, and you have to keep them updated. You're not thinking about any of that. And same way on the database side, you're not worrying about manually administering …

Get the full transcript (12,385 words) + summary by email — free

One-time email with the complete transcript and AI summary of this episode. No account needed.

One email, no spam. We’ll also show you what SignalCast does.

Browse all Full Stack Radio transcripts →

You just read a 3-minute summary of a 58-minute episode.

Get Full Stack Radio summarized like this every Monday — plus up to 2 more podcasts, free.

Pick Your Podcasts — Free

Keep Reading

Books, tools, and gear mentioned in this episode

SignalCast may earn commission on purchases via these links.

Tools

  • by Amazon Web Services

    Taylor Otwell introduces Laravel Vapor, a serverless deployment platform for Laravel applications on AWS Lambda.
  • by Amazon Web Services

    Start with a $15/month RDS MySQL instance that can host multiple databases for different projects.
  • by Cloudinary

    Cloudinary is listed as a sponsor of the episode.
  • DynamoDBRecommended

    by Amazon Web Services

    Use DynamoDB as a free cache option instead of ElastiCache to avoid additional monthly costs.
  • by Laravel

    Taylor Otwell introduces Laravel Vapor, a serverless deployment platform for Laravel applications on AWS Lambda.
  • by Amazon Web Services

    Stream files directly from frontend to S3 using pre-signed URLs instead of uploading through web servers.
  • by Laravel

    Otwell reveals that Laravel Forge runs on a single 4GB DigitalOcean server with CPU utilization typically under 10 percent, despite generating seven figures annually.
  • by Amazon Web Services

    Use DynamoDB as a free cache option instead of ElastiCache to avoid additional monthly costs.

company

  • by DigitalOcean

    Otwell reveals that Laravel Forge runs on a single 4GB DigitalOcean server with CPU utilization typically under 10 percent.

More from Full Stack Radio

We summarize every new episode. Want them in your inbox?

Similar Episodes

Related episodes from other podcasts

Explore Related Topics

This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.

Read this week's Software Engineering Podcast Insights — cross-podcast analysis updated weekly.

You're clearly into Full Stack Radio.

Every Monday, we deliver AI summaries of the latest episodes from Full Stack Radio and 192+ other podcasts. Free for one show.

Start My Monday Digest

No credit card · Unsubscribe anytime