Skip to main content
CF

Scaling Laravel

9h 29m 45s
English
Paid

The first time I put code into a load balanced environment, I accidentally gave away thousands of dollars in prizes within a few minutes. After pulling an all-nighter to get the code complete under the deadline, I pushed up code that was *not* ready to be in a scaled architecture. I was clueless. That night was terrible chaos, but it's what made me decide to learn more about servers! In the following years, I learned a lot about servers.

It turns out that scaling your application isn't necessarily hard, but there is a lot to know!

This course aims to help you navigate setting your application up to scale without suffering the same pain I did.

Laravel Optimization

Performance tips to implement into your applications.

  • Caching Tools
  • Efficient Eloquent Queries
  • Table Indexing
  • Object Caching
  • Advanced Queues
  • VueJS with Laravel Echo for real-time updates
  • Transactions & Concurrency Control

Server Optimization

Squeezing more requests per second out of your servers.

  • Setup & Security
  • Network Optimization
  • PHP-FPM Configuration
  • Opcache
  • MySQL Fine-Tuning
  • Server Specialization

Horizontal Scaling

Learn about load balancing and how it affects your application.

  • HAProxy
  • Automated LetsEncrypt for SSL
  • Network Security
  • Static Assets & Sessions
  • Application Readiness

Advanced MySQL

Using MySQL effectively in production.

  • GTID-based replication
  • Best usage of mysqldump
  • "Physical" backups with xtrabackup
  • Streaming backups to S3
  • UTF-8 and performance configuration

About the Author: Servers for Hackers

Servers for Hackers thumbnail

Servers for Hackers is the long-running technical-publication and course site of Chris Fidao, focused on the production-operations side of running PHP and Laravel applications — the parts of shipping software that don't fit inside a framework tutorial. He also runs Fly.io for Laravel and Chipper CI, and has been one of the most consistent voices on the Laravel deployment / DevOps boundary.

The CourseFlix listing carries Scaling Laravel and Deploy PHP! — both paid courses aimed at PHP developers ready to take operational responsibility for their own services rather than handing them off to a separate ops team.

Watch Online 69 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 69 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: The Optimize Command
All Course Lessons (69)
#Lesson TitleDurationAccess
1
The Optimize Command Demo
05:40
2
The Route Cache
05:08
3
The Config Cache
05:40
4
Eager Loading
05:33
5
Database Chunking
07:05
6
Chunk By Id
03:27
7
MySQL Indexing I
07:19
8
MySQL Indexing II
05:43
9
MySQL Indexing III
20:35
10
Object Caching I
03:21
11
Object Caching II
09:14
12
Object Caching III
13:43
13
Object Caching IV
05:56
14
Installing the Basics
07:24
15
Forge-Like Configuration
13:11
16
Security
14:43
17
Network Configuration
10:57
18
FPM Process Management
13:30
19
xDebug
02:42
20
Opcache
09:11
21
Session Garbage Collection
05:47
22
Custom Route Files
06:54
23
A New App
03:11
24
Sending Mail
05:39
25
Database Queue Driver
10:41
26
UX and VueJS
11:38
27
Integrating Pusher
14:29
28
Tracking Tasks
20:02
29
Database Queue Limitations
02:47
30
Redis Queue
02:28
31
Laravel Horizon
10:44
32
SQS Queue
12:28
33
SQS and Wait Time
11:27
34
Queue Priority and Segmenting
10:45
35
Queues in Production
16:10
36
What We're Doing
05:15
37
MySQL Install & Setup
14:00
38
MySQL Optimization
12:19
39
Redis Server
07:25
40
Additional Network Security
09:48
41
HAProxy Part I
06:38
42
HAProxy Basic Load Balancing
05:37
43
Header Detection with Trusted Proxies
15:36
44
Let's Encrypt with HAProxy
16:45
45
Session Management
05:04
46
User Uploaded Files with VueJS
22:21
47
The User Uploaded File Problem
02:25
48
Amazon S3 for File Storage
06:47
49
Upload to S3
03:16
50
Download From S3
13:19
51
Finishing VueJS Uploads
04:28
52
Intro to Scaling on Forge
01:23
53
Creating Servers
04:41
54
Access & GitHub
02:15
55
Application Setup
06:42
56
Networking
04:27
57
Final App Touches
05:05
58
Forge Recipes
05:14
59
Queue Workers
10:55
60
CRON Server
10:11
61
CRON & Laravel 5.6
07:29
62
Data Integrity Intro
02:04
63
Transactions in Laravel
08:38
64
Repeatable Read Isolation
08:29
65
Isolation Level Caveat
03:58
66
Laravel Transactions with SELECTs
02:54
67
Pessimistic vs Optimistic Overview
03:26
68
Pessimistic Locking
05:08
69
Optimistic Locking
10:31
Unlock unlimited learning

Get instant access to all 68 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What are the prerequisites for enrolling in this course?
Before enrolling, students should have a fundamental understanding of Laravel and basic web development concepts. Familiarity with server management and database operations will be beneficial. The course builds upon Laravel's features such as Eager Loading, Route Cache, and Config Cache, so prior experience with Laravel frameworks is recommended.
What specific tools and platforms are covered in this course?
The course covers a variety of tools and platforms essential for scaling Laravel applications. Topics include MySQL for database management, Redis for caching and queues, HAProxy for load balancing, and Amazon S3 for file storage. It also introduces using Forge for server creation and management, as well as integrating services like Pusher for real-time communication.
Who is the target audience for this course?
This course is designed for developers who have experience with Laravel and are looking to scale their applications effectively. It is ideal for those who want to deepen their understanding of server management and deployment in load-balanced environments. It's particularly useful for those who need to optimize Laravel applications for high traffic.
What will students build by the end of this course?
Students will work on a comprehensive project involving the setup and optimization of a Laravel application in a load-balanced environment. Key components include configuring MySQL, Redis, HAProxy for load balancing, and Amazon S3 for file storage. The course also covers deploying the application using Forge and managing queues with Laravel Horizon.
How does this course compare in depth and scope to similar courses?
This course offers a focused exploration of scaling Laravel applications, addressing both backend server optimization and frontend integration with VueJS. Unlike general web development courses, it provides detailed insights into load balancing using HAProxy, optimizing database interactions with MySQL indexing, and advanced queue management. It's particularly comprehensive in teaching practical server management skills.
What topics are not covered in this course?
The course does not cover basic Laravel installation or beginner-level PHP programming. It assumes a working knowledge of these areas. Additionally, it does not delve into non-Laravel specific frontend frameworks beyond basic integration with VueJS, nor does it include advanced security protocols outside of network configuration and additional network security.
What is the estimated time commitment for this course?
The course consists of 69 lessons, and while the total runtime is unspecified, students should anticipate dedicating substantial time to both video content and hands-on exercises. Given the advanced nature of the topics, including server setup and optimization, students should plan for additional time to implement and test the concepts covered in each module.