🔥 Here are some of the most basic monitoring techniques you can start using immediately:
- Spatie laravel-health
- Error tracking
- Syntethic checks
It takes ~30 minutes to set up these.
🧵 Keep Reading
Health checks with laravel-health
The package can check:
- CPU load
- Disk space utilization
- Database connectivity
- Redis
- And even query speed
The example contains pre-built checks. For instance, it notifies you if the average CPU load is higher than 2.5 in the last 5 minutes or 2 in the previous 15 minutes.
It also notifies you if the used disk space is more than 70%
The single best package to handle Excel exports and imports:
- Exporting collections
- Storing files
- Exporting from a query
- Queue jobs
- And more
2/ laravel-health
This amazing Spatie package can monitor the health of your application and server. It sends you notifications if something's wrong. For example:
- CPU load
- Used disk space
- Database connections
- Redis
- and more
Redis is way more than just a cache system - it's a powerful distributed key-value in-memory database with rich features. Let me break down why Redis is awesome and what you can actually build with it.
Keep Reading🧵
2/12 Redis stores everything in memory, making it blazing fast compared to traditional databases like MySQL that need disk reads.
But don't worry - Redis still persists your data using AOL and RDB, so you won't lose anything if you restart.
3/12 Redis Lists are perfect for building queues, stacks, and temporary storage.
You can implement job queues, undo/redo functionality, recent activity feeds, and data buffers. Think Spotify's "Add to Queue" or Amazon's "Recently Viewed Items"
Here's a thread with fundamental tips and techniques to optimize your database queries.
🧵 Keep Reading
2/ First tip: Use EXPLAIN to identify inefficient queries.
Watch out for 'ALL' access type. It means full table scan. MySQL scans the entire table. It's like a for loop that iterates through each row,
The 'Index' access type isn't great either, as it reads the whole BTREE index.
3/ 'Range' access type is good, sinbce MySQL is able to identify a range of rows fromn an index. But check if 'Using index' appears in Extra column. If not, you're doing unnecessary I/O operations.