If the application wants to setup a scalable infrastructure which of the below mentioned options will help achieve this setup?
Host the log files on EBS with PIOPS which will have higher I/O.
Host logging and the app server on separate servers such that they are both in the same zone.
Host logging and the app server on the same instance so that the network latency will be shorter.
Create a separate module for logging and using SQS compartmentalize the module such that all calls to logging are asynchronous.
Explanations:
While hosting log files on EBS with PIOPS may improve I/O performance, it does not directly address the scalability or the logging overhead during application execution. This option focuses on storage performance but does not improve application responsiveness.
Hosting logging and the application server on separate servers can help with resource allocation, but it may still lead to increased latency in log processing if both servers are trying to communicate frequently. This setup doesn’t inherently improve scalability or performance for logging operations.
Hosting logging and the application server on the same instance reduces network latency but can lead to resource contention. If logging takes considerable time, it may block other application processes, reducing overall scalability and responsiveness.
Creating a separate logging module that utilizes SQS for asynchronous logging effectively decouples the logging process from the application execution. This allows the application to continue processing requests without waiting for logging operations to complete, enhancing scalability and performance under load.