Simplifying the Cloud Native journey with GraalVM Enterprise and Helidon
Standard Chartered Bank, an international banking and financial services company with 1026 branches across the globe and 86,000 employees, set out to build fast and efficient cloud native Java applications. For maximum performance and productivity they chose GraalVM and Helidon.
To build stable and robust banking solutions, Standard Chartered’s development teams use mostly Java, along with some Python and other languages with the Spring Boot framework, JAX and other tools. For external developers, they offer an advanced API and aXess – Open Banking platform, that allows developers and partners to create banking products. Standard Chartered has also recently launched a virtual bank called Mox, built on a modern next generation devops platform.
While working on a new project, the Internet Banking team within Standard Chartered was looking for a way to make their Java applications start fast, be ready for cloud deployment, and also streamline their CI/CD pipeline.
SCB’s Cloud Strategy, accelerated by Oracle
Standard Chartered Bank’s cloud strategy was kick started in 2016 with enhanced focus on Private Cloud using OpenShift Container Platform in their own premises. While SCB always had experienced technical teams proficient in Java, the migration from traditional JBoss deployments to Kubernetes had its own set of challenges. Partnering with Oracle and adopting the newest Java features for a container-first architecture has greatly facilitated the migration to Kubernetes. SCB is a major user of JDK, Oracle Database, and of course their flagship product – Oracle WebLogic. These products power mission critical applications inside the Bank and server more than 40 markets across the planet.
Standard Chartered's partnership with Oracle strengthened even more, thanks to the migration to Public Cloud. Cloud migration strategies paved the way to focus on open source software, and writing efficient, secure, and instantly scalable microservices. Decades of JavaEE expertise has paved the way to finding Helidon as the faster, leaner, and modern younger sibling to WebLogic. Out of the box support for common authentication mechanisms such as OIDC, OAuth etc. support for tracing mechanisms like Prometheus, Zipkin just reaffirmed their choice.
Research and Evaluation
To improve the performance of applications and make them cloud native, the team considered a few options, such as rewriting their apps in Go, migrating to Kotlin and using a custom jlink-generated JRE, or using GraalVM Enterprise as runtime.
One important consideration when evaluating prototypes is how well they fit into cloud deployment scenarios. The ideal solution would allow applications to start fast and use as little memory as possible, since compute and memory resources affect cloud costs, and this becomes even more important at scale with high-load banking systems.
Another aspect of evaluation is scalability. One of the primary reasons to move to cloud is to take advantage of their ability to scale up and down quickly to meet demand, or roll out new updates fast, but that becomes a challenge when facing traditional VM cold starts.
Another key focus for Standard Chartered was to determine if Java would support their move to cloud or whether they would have to migrate to another language. Java was their preferred choice because of the team’s expertise in the language combined with Java’s rich ecosystem, strong community, and advanced tools.
As the team discovered, GraalVM Native Image technology offered a solution for all those challenges. The applications could be still written in Java and compiled into native executables, which have reduced startup times up to 50x faster compared to running in JVM mode since the code is optimized in advance. Native executables also use ~5x less memory since they don’t require a JVM or a JIT compiler and the memory overhead incurred by its code code caches and performance profile data.
A native executable includes all necessary runtime libraries so it can be put into a `FROM scratch` container. For a basic microservice, the container size can be as low as 20-25 MBs.
GraalVM’s ability to produce native executables for Java applications is widely recognized by popular Java frameworks with Micronaut, Helidon and Quarkus already include GraalVM Native Image integration. The Spring Boot team is also actively working on an integration project. In practice, well known cloud-scale companies like Alibaba have reported that native executables generated by GraalVM Native Image provide excellent performance under extreme load.
Evaluation results
Along with GraalVM Enterprise, the Standard Chartered team evaluated Helidon, which provides an open source, lightweight, cloud native framework for developing Java microservices. It comes in two versions: Helidon SE is designed to be a microframework that supports the reactive programming model, while Helidon MP supports the execution of portable microservices that comply with the Eclipse MicroProfile specification. The team decided to try Helidon SE, since support for reactive services and lightweight applications were a better fit for the project goals.
To evaluate GraalVM and Helidon, the team ran a sample app and measured startup time and Docker image size. The app was a typical enterprise application with connectors to Kafka and ActiveMQ along with Hibernate to access a PostgreSQL database. Benchmark environment: AMD Ryzen 7 3700x (8-core with hyperthreading), Linux kernel 5.9.16 Fedora.
0 comments:
Post a Comment