Given the following:
- I have an AWS EC2 t3.small instance.
- The instance uses the most recent Ubuntu LTS as its operating system.
- The instance has 2GB RAM and 2 CPU cores available.
- I have installed modern versions of Nginx, PHP, and PHP-FPM.
- All other services (MySQL, Redis, Supervisor, SMTP, and Cron) are installed on other instances.
- I have deployed a RESTful API codebase to that instance.
- The codebase uses a modern version of Symfony, Laravel, or CakePHP.
- The instance takes around 100ms to respond to a single request.
I have calculated that this instance can serve 20 requests per second. My logic is as follows:
- Each request takes around 100ms to respond.
- Each core can respond to 10 requests per second.
- The instance has two cores.
Does this sound correct?