J-Fall 2021: Simon Ritter – AOT or JIT: Faster Startup or Faster Code?
Microservices have become a prevalent architectural approach to developing applications. Moving from a monolithic application to multiple container-based services has many advantages. One of the largest is dynamic scalability; spinning up and shutting down instances of services to adapt to dynamic loads is very cost-effective in a public cloud environment. For JVM-based applications, running in a managed environment using JIT compilation, this provides additional challenges. Primarily, this is around the time required for a service to warm up and reach the optimum level of performance. To address this, we have seen various approaches such as the Graal VM and Quarkus that use an AOT approach rather than JIT compilation. In this session, we will explore the pros and cons of both approaches to help in understanding the tradeoff between initial performance and overall performance. At the end of the session, you will have a clear idea of how to approach your Java microservice design from the AOT and JIT perspective.