C.R.a.C in Spring - I Froze My Server! (15 Minute Session For NLJUG Speaker Academy)
Starting up complex enterprise Java applications may take a long time and you may not want to wait that long when scaling or deploying. Project CRaC, meaning Coordinated Restore at Checkpoin…
Full description
Superior de Engenharia de Lisboa) • Telecommunications and Computers Engineering • OCP11 - VMWare Spring Professional 2021 - Kong Champion • Plants, Furniture making, Nature • JESPROTECH channel on YouTube
Linux ◦ Mitigation of fault tolerance and processes • 2021 ◦ CRaC started with coordinated checkpoint and restore operations ◦ Prepare checkpoint ◦ Save state ◦ Restore later • 2022 - 2023 ◦ Experimentation and tests in frameworks like Spring and Quarkus • 2023 ◦ In April Azul releases the first JDK 17 supporting C.R.a.C.
at checkpoints • Close files, connections and dump cache before checkpoint • Restores, files, connections and cache after checkpoint • A checkpoint is where we freeze the service • The restore doesn’t start the runtime from the checkpoint
JDK itself: ◦ sudo chown root:root $(JAVA_HOME)/lib/criu ◦ sudo chmod u+s $(JAVA_HOME)/lib/criu • The jar MUST be compiled with CRaC compatible JDK • The jar MUST run with CRaC compatible Runtime
• Or via the command line: ◦ jcmd target/crac-service-java.jar JDK.checkpoint • Start the service indicating the target dump directory: ◦ java -XX:CRaCCheckpointTo=./tmp_checkpoint -jar target/crac-service-java.jar • Use a tool to make requests to the application ◦ siege -c 1 -r 100000 -b http://localhost:8080
to be via the command line: ◦ java -XX:CRaCRestoreFrom=./tmp_checkpoint ◦ java -XX:CRaCRestoreFrom=./tmp_checkpoint -cp target/crac-runner-java.jar org.jesperancinha.smtd.CracRunner
usage of Kotlin Coroutines? What experience can tell us • Integrating Arrow Optics in a Real Life Scenario, my personal life experience in a parallel world • Kotlin Mysteries found from years working with Kotlin • Finally, we can simplify our code with Java Virtual Threads and do away with Kotlin Coroutines! • Improve startup times with Spring CRaC by freezing your spring service!