Scaling Laravel with Serverless Redis

Introduction

Prerequisites

Architecture Overview

What is Serverless Redis?

Why Serverless Redis?

Horizontal Scaling vs. Vertical Scaling

Creating a serverless Redis cluster

Configuring Laravel with Serverless Redis

Install the Predis package

composer require predis/predis
REDIS_HOST=your_upstash_redis_endpoint
REDIS_PASSWORD=your_upstash_redis_password
REDIS_PORT=your_upstash_redis_port
CACHE_DRIVER=redis
SESSION_DRIVER=redis
php artisan config:clear

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Bobby Iliev

I am a professional System Administrator with a demonstrated history of working in the internet industry. I am a Linux lover