There are several primary reasons that applications perform poorly, and in some cases it’s a combination of several. 1) Data latency: If your application is making calls to a data source (whether it’s an API or a direct call) and there is latency at the data provider, your application performance will suffer.Figure out how to get faster responses from your data source or build an asynchronous user experience so part of your application can load while the part dependent on the latent data can be rendered.
2) Nested or recursive functions: If your application is built on heavily nested or recursive functions (especially with remote or latent data) your application will perform poorly. The round trip time will continue to build on itself until the performance is simply unacceptable. Figure out ways to pre-process, cache, or optimize your queries to limit these types of calls.
3) Not enough power: One of the major benefits of the hyperscalers is the ability to ramp up and down as applications require. Load balancers and additional instances of application servers can be spun up and spun down as needed to give your application the horsepower it needs without investing in excessive infrastructure.