There are some pretty simple tools you can start measuring your app's performance with:
- ab
- jmeter
- Inspector
- Telescope
🧵 Keep Reading
1/14 Here are some of the most important measures of an API/backend service:
- Throughput: the number of requests the system can handle
- Load time: the amount of time it takes for an HTTP request to respond
- Size: the total size of the HTTP response.
2/14 ...measures of an API/backend service
- Server uptime: the duration of time the server is up and running
- CPU usage: the amount of CPU your system needs to run. It is usually expressed as load average
- Memory usage: the amount of memory your system uses
💡How to integrate 3rd parties into your application?
We have to integrate with a ton of 3rd party APIs, and SDKs in every project. You can treat them as mini-applications inside your app.
🧵Keep Reading
1/14
Treat your 3rd parties as if they were mini-applications inside your application. They have their own namespaces with their own DTOs service classes and so on. Something like this:
2/14
In the Services folder, I create a new folder for each 3rd party and treat it like it is a mini-application inside my app.
💡 If you're running PHP or Laravel apps in production you're probably using nginx and php-fpm.
But do you actually know what these terms mean?
- CGI
- FastCGI
- php-fpm
- How do they connect to nginx?
Let's find out!
🧵 Keep Reading
1/9 CGI
CGI stands for Common Gateway Interface. As the name suggests, it's not a package or library. No, it's an interface, a protocol.
CGI gives us a unified way to run scripts from web servers to generate dynamic content.
2/9 CGI
It's platform and language-independent so the script can be written in PHP, python, or anything.
CGI uses a "one-process-per-request" model. It means that when a request comes in to the web browser it creates a new process to execute the php script:
💡 If you're running PHP or Laravel apps in production you're probably using nginx and php-fpm.
But do you actually know what these terms mean?
- CGI
- FastCGI
- php-fpm
- How do they connect to nginx?
Let's find out!
🧵 Keep Reading
1/9 CGI
CGI stands for Common Gateway Interface. As the name suggests, it's not a package or library. No, it's an interface, a protocol.
CGI gives us a unified way to run scripts from web servers to generate dynamic content.
2/9 CGI
It's platform and language-independent so the script can be written in PHP, python, or anything.
CGI uses a "one-process-per-request" model. It means that when a request comes in to the web browser it creates a new process to execute the php script:
The single best package to handle Excel exports and imports:
- Exporting collections
- Storing files
- Exporting from a query
- Queue jobs
- And more
2/17 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