-
Notifications
You must be signed in to change notification settings - Fork 0
Evaluation about Several Jars such as AOT‐processed, CDS, pure Jar
Recently, Data traffics are rapidly increased. a lot of companies are considering minium resources and high performance. because computing resources will be charged amount of usages in cloud platform such as AWS, GCP and AZURE. In order to accept huge traffics, a lot of computing resources are used. therefore many software engineers are tring to solve increase resources depending on traffics by various program languages such as python, go and javascript, etc. Java side suggests native image to reduce resources usages and increase performance via GraalVM. and Java side/JDK Teams try to solve Java application had several issues such as slow start, slow warm up and a lot of memory usages. in this wiki, we evaluate 3 types of application's performance such as GraalVM compiled binary image, Class Data Sharing used jar and pure jar application under limited resources. In order to limit resource, we have used docker.
We will simulate several jars such as aot processed, class data sharing(cds) and pure jar, about three tasks :
- started time
- web page loading time at first after started application (ig. http://localhost:8080/swagger-ui.html)
- api execution time via swagger-ui
we will use docker-compose to create for separate instances :
name: support-rest
services:
webapp:
image: demo-api:local
build:
context: ./
dockerfile: Dockerfile
ports:
- "9090:8080"
environment:
- SPRING_PROFILES_ACTIVE=local
cpus: 0.2
mem_limit: 1024m
webapp-aot:
image: demo-aot-api:local
build:
context: ./
dockerfile: Dockerfile_aot
ports:
- "9091:8080"
environment:
- SPRING_PROFILES_ACTIVE=local
cpus: 0.2
mem_limit: 1024m
webapp-cds:
image: demo-cds-api:local
build:
context: ./
dockerfile: Dockerfile_cds
ports:
- "9092:8080"
environment:
- SPRING_PROFILES_ACTIVE=local
cpus: 0.2
mem_limit: 1024m
webapp | webapp-aot | webapp-cds | |
---|---|---|---|
1st test | 79.748 | 4.891 | 57.89 |
2nd test | 79.177 | 4.495 | 58.147 |
Aot processed application's started time is faster than other jars at max 20 times. application jar started time using CDS is faster than pure jar, too. it means CDS is effected properly In order for ready to service as soon as possible to manage huge traffic shortly appeared and disappeared, Aot processed can be considered. logs are provided next paragraphe
1st test
webapp-aot-1 | 2024-11-07 00:06:34,119 [main] INFO com.example.support.BootApplication - L:56 Started BootApplication in 4.889 seconds (process running for 4.891)
webapp-cds-1 | 2024-11-07 00:07:23,726 [main] INFO com.example.support.BootApplication - L:56 Started BootApplication in 56.202 seconds (process running for 57.89)
webapp-1 | 2024-11-07 00:07:45,718 [main] INFO com.example.support.BootApplication - L:56 Started BootApplication in 77.291 seconds (process running for 79.748)
2nd test
webapp-aot-1 | 2024-11-07 01:03:23,878 [main] INFO com.example.support.BootApplication - L:56 Started BootApplication in 4.492 seconds (process running for 4.495)
webapp-cds-1 | 2024-11-07 01:04:14,171 [main] INFO com.example.support.BootApplication - L:56 Started BootApplication in 56.292 seconds (process running for 58.147)
webapp-1 | 2024-11-07 01:04:35,386 [main] INFO com.example.support.BootApplication - L:56 Started BootApplication in 76.608 seconds (process running for 79.177)
webapp | webapp-aot | webapp-cds | |
---|---|---|---|
1st test | 3,796 | 247 | 3,902 |
2nd test | 3,400 | 152 | 3,203 |
Aot processed application measured minimum initial response duration time of test results. however, pure jar and cds jar are similar to measure response duration time. CDS might affect only application starting. so CraC project tries to solve this issue, as I am known, it wants to leave a warmed memory snapshot before application destroy phase, which will be used for starting
1st test
webapp-aot-1 | 2024-11-07 00:53:59,583 [tomcat-handler-7] INFO o.s.api.AbstractOpenApiResource - L:390 Init duration for springdoc-openapi is: 247 ms
webapp-cds-1 | 2024-11-07 00:54:11,385 [tomcat-handler-6] INFO o.s.api.AbstractOpenApiResource - L:390 Init duration for springdoc-openapi is: 3902 ms
webapp-1 | 2024-11-07 00:53:51,882 [tomcat-handler-7] INFO o.s.api.AbstractOpenApiResource - L:390 Init duration for springdoc-openapi is: 3796 ms
2nd test
webapp-aot-1 | 2024-11-07 01:05:50,579 [tomcat-handler-8] INFO o.s.api.AbstractOpenApiResource - L:390 Init duration for springdoc-openapi is: 152 ms
webapp-cds-1 | 2024-11-07 01:05:58,076 [tomcat-handler-8] INFO o.s.api.AbstractOpenApiResource - L:390 Init duration for springdoc-openapi is: 3203 ms
webapp-1 | 2024-11-07 01:05:46,875 [tomcat-handler-7] INFO o.s.api.AbstractOpenApiResource - L:390 Init duration for springdoc-openapi is: 3400 ms
These experiments also show the same tendency as the existing test. There is a special part in this experiment. While testing in webapp api-2 2nd phase, cache was expired. so application cache system had to re-create cache data again. In this result, we had found our application reduced response time about 200ms by cache hitting. Cache refresh time is approximately 40% of the total response time of 484 ms. Once again, we were able to confirm the performance improvement using cache.
webapp | webapp-aot | webapp-cds | |
---|---|---|---|
1st test | 2,100 | 699 | 2,707 |
2nd test | 272 | 237 | 210 |
1st test log (elapsed time 2,100ms)
webapp-1 | 2024-11-07 01:07:34,868 [tomcat-handler-13] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-1 | 2024-11-07 01:07:34,871 [tomcat-handler-13] TRACE o.s.c.interceptor.CacheInterceptor - L:490 No cache entry for key 'robot' in cache(s) [apps]
webapp-1 | Hibernate: select m1_0.member_id,m1_0.password from tb_member m1_0 where m1_0.member_id=?
webapp-1 | 2024-11-07 01:07:35,771 [tomcat-handler-13] DEBUG c.e.s.component.UserAccountDetails - L:37 Success find member Member(memberId=robot)
webapp-1 | 2024-11-07 01:07:36,367 [tomcat-handler-13] TRACE o.s.c.interceptor.CacheInterceptor - L:1033 Creating cache entry for key 'robot' in cache(s) [apps]
webapp-1 | 2024-11-07 01:07:36,467 [Ehcache [_default_]-0] DEBUG c.e.s.configuration.CacheEventLogger - L:13 CREATED=key:robot old:null new:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]]
webapp-1 | 2024-11-07 01:07:36,967 [tomcat-handler-13] INFO c.e.s.controller.WelcomeController - L:19 Welcome to the Support Application! via basic auth robot
webapp-1 | 2024-11-07 01:07:36,968 [tomcat-handler-13] INFO c.e.support.advice.ControllerAspect - L:26 WelcomeController.welcome(..):0ms params:{authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=172.19.0.1, SessionId=null], Granted Authorities=[ROLE_USER]]}
2nd test log (elapsed time 272ms)
webapp-1 | 2024-11-07 01:10:33,495 [tomcat-handler-15] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-1 | 2024-11-07 01:10:33,501 [tomcat-handler-15] TRACE o.s.c.interceptor.CacheInterceptor - L:484 Cache entry for key 'robot' found in cache(s) [apps]
webapp-1 | 2024-11-07 01:10:33,766 [tomcat-handler-15] INFO c.e.s.controller.WelcomeController - L:19 Welcome to the Support Application! via basic auth robot
webapp-1 | 2024-11-07 01:10:33,767 [tomcat-handler-15] INFO c.e.support.advice.ControllerAspect - L:26 WelcomeController.welcome(..):1ms params:{authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=172.19.0.1, SessionId=null], Granted Authorities=[ROLE_USER]]}
1st test log (elapsed time 699ms)
webapp-aot-1 | 2024-11-07 01:09:12,366 [tomcat-handler-14] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-aot-1 | 2024-11-07 01:09:12,366 [tomcat-handler-14] TRACE o.s.c.interceptor.CacheInterceptor - L:490 No cache entry for key 'robot' in cache(s) [apps]
webapp-aot-1 | Hibernate: select m1_0.member_id,m1_0.password from tb_member m1_0 where m1_0.member_id=?
webapp-aot-1 | 2024-11-07 01:09:12,368 [tomcat-handler-14] DEBUG c.e.s.component.UserAccountDetails - L:37 Success find member Member(memberId=robot)
webapp-aot-1 | 2024-11-07 01:09:12,675 [tomcat-handler-14] TRACE o.s.c.interceptor.CacheInterceptor - L:1033 Creating cache entry for key 'robot' in cache(s) [apps]
webapp-aot-1 | 2024-11-07 01:09:12,677 [Ehcache [_default_]-0] DEBUG c.e.s.configuration.CacheEventLogger - L:13 CREATED=key:robot old:null new:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]]
webapp-aot-1 | 2024-11-07 01:09:12,984 [tomcat-handler-14] INFO c.e.s.controller.WelcomeController - L:19 Welcome to the Support Application! via basic auth robot
webapp-aot-1 | 2024-11-07 01:09:13,065 [tomcat-handler-14] INFO c.e.support.advice.ControllerAspect - L:26 WelcomeController.welcome(..):81ms params:{authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=172.19.0.1, SessionId=null], Granted Authorities=[ROLE_USER]]}
2nd test log (elapsed time 237ms)
webapp-aot-1 | 2024-11-07 01:11:27,726 [tomcat-handler-16] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-aot-1 | 2024-11-07 01:11:27,726 [tomcat-handler-16] TRACE o.s.c.interceptor.CacheInterceptor - L:484 Cache entry for key 'robot' found in cache(s) [apps]
webapp-aot-1 | 2024-11-07 01:11:27,963 [tomcat-handler-16] INFO c.e.s.controller.WelcomeController - L:19 Welcome to the Support Application! via basic auth robot
webapp-aot-1 | 2024-11-07 01:11:27,963 [tomcat-handler-16] INFO c.e.support.advice.ControllerAspect - L:26 WelcomeController.welcome(..):0ms params:{authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=172.19.0.1, SessionId=null], Granted Authorities=[ROLE_USER]]}
1st test log (elapsed time 2,707ms)
webapp-cds-1 | 2024-11-07 01:10:06,666 [tomcat-handler-14] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-cds-1 | 2024-11-07 01:10:06,669 [tomcat-handler-14] TRACE o.s.c.interceptor.CacheInterceptor - L:490 No cache entry for key 'robot' in cache(s) [apps]
webapp-cds-1 | Hibernate: select m1_0.member_id,m1_0.password from tb_member m1_0 where m1_0.member_id=?
webapp-cds-1 | 2024-11-07 01:10:08,074 [tomcat-handler-14] DEBUG c.e.s.component.UserAccountDetails - L:37 Success find member Member(memberId=robot)
webapp-cds-1 | 2024-11-07 01:10:08,670 [tomcat-handler-14] TRACE o.s.c.interceptor.CacheInterceptor - L:1033 Creating cache entry for key 'robot' in cache(s) [apps]
webapp-cds-1 | 2024-11-07 01:10:08,864 [Ehcache [_default_]-0] DEBUG c.e.s.configuration.CacheEventLogger - L:13 CREATED=key:robot old:null new:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]]
webapp-cds-1 | 2024-11-07 01:10:09,372 [tomcat-handler-14] INFO c.e.s.controller.WelcomeController - L:19 Welcome to the Support Application! via basic auth robot
webapp-cds-1 | 2024-11-07 01:10:09,373 [tomcat-handler-14] INFO c.e.support.advice.ControllerAspect - L:26 WelcomeController.welcome(..):0ms params:{authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=172.19.0.1, SessionId=null], Granted Authorities=[ROLE_USER]]}
2nd test log (elapsed time 210ms)
webapp-cds-1 | 2024-11-07 01:11:54,553 [tomcat-handler-16] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-cds-1 | 2024-11-07 01:11:54,558 [tomcat-handler-16] TRACE o.s.c.interceptor.CacheInterceptor - L:484 Cache entry for key 'robot' found in cache(s) [apps]
webapp-cds-1 | 2024-11-07 01:11:54,682 [tomcat-handler-16] INFO c.e.s.controller.WelcomeController - L:19 Welcome to the Support Application! via basic auth robot
webapp-cds-1 | 2024-11-07 01:11:54,763 [tomcat-handler-16] INFO c.e.support.advice.ControllerAspect - L:26 WelcomeController.welcome(..):81ms params:{authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=172.19.0.1, SessionId=null], Granted Authorities=[ROLE_USER]]}
webapp | webapp-aot | webapp-cds | |
---|---|---|---|
1st test | 660 | 587 | 670 |
2nd test | 484 | 166 | 288 |
1st test log (elapsed time 660ms)
webapp-1 | 2024-11-07 01:20:45,207 [tomcat-handler-17] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-1 | 2024-11-07 01:20:45,211 [Ehcache [_default_]-1] DEBUG c.e.s.configuration.CacheEventLogger - L:13 EXPIRED=key:robot old:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]] new:null
webapp-1 | 2024-11-07 01:20:45,212 [tomcat-handler-17] TRACE o.s.c.interceptor.CacheInterceptor - L:490 No cache entry for key 'robot' in cache(s) [apps]
webapp-1 | Hibernate: select m1_0.member_id,m1_0.password from tb_member m1_0 where m1_0.member_id=?
webapp-1 | 2024-11-07 01:20:45,215 [tomcat-handler-17] DEBUG c.e.s.component.UserAccountDetails - L:37 Success find member Member(memberId=robot)
webapp-1 | 2024-11-07 01:20:45,459 [tomcat-handler-17] TRACE o.s.c.interceptor.CacheInterceptor - L:1033 Creating cache entry for key 'robot' in cache(s) [apps]
webapp-1 | 2024-11-07 01:20:45,460 [Ehcache [_default_]-1] DEBUG c.e.s.configuration.CacheEventLogger - L:13 CREATED=key:robot old:null new:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]]
webapp-1 | Hibernate: select a1_0.announce_id,a1_0.begin_datetime,a1_0.content,a1_0.end_datetime,a1_0.inserted_datetime,a1_0.title,a1_0.updated_datetime,a1_0.view_count,a1_0.writer from tb_announcement a1_0
webapp-1 | 2024-11-07 01:20:45,867 [tomcat-handler-17] INFO c.e.support.advice.ControllerAspect - L:26 AnnouncementGetController.getAllAnnouncements():104ms params:{}
2nd test log (elapsed time 484ms)
webapp-1 | 2024-11-07 01:26:01,081 [tomcat-handler-19] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-1 | 2024-11-07 01:26:01,083 [Ehcache [_default_]-2] DEBUG c.e.s.configuration.CacheEventLogger - L:13 EXPIRED=key:robot old:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]] new:null
webapp-1 | 2024-11-07 01:26:01,083 [tomcat-handler-19] TRACE o.s.c.interceptor.CacheInterceptor - L:490 No cache entry for key 'robot' in cache(s) [apps]
webapp-1 | Hibernate: select m1_0.member_id,m1_0.password from tb_member m1_0 where m1_0.member_id=?
webapp-1 | 2024-11-07 01:26:01,086 [tomcat-handler-19] DEBUG c.e.s.component.UserAccountDetails - L:37 Success find member Member(memberId=robot)
webapp-1 | 2024-11-07 01:26:01,269 [tomcat-handler-19] TRACE o.s.c.interceptor.CacheInterceptor - L:1033 Creating cache entry for key 'robot' in cache(s) [apps]
webapp-1 | 2024-11-07 01:26:01,350 [Ehcache [_default_]-2] DEBUG c.e.s.configuration.CacheEventLogger - L:13 CREATED=key:robot old:null new:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]]
webapp-1 | Hibernate: select a1_0.announce_id,a1_0.begin_datetime,a1_0.content,a1_0.end_datetime,a1_0.inserted_datetime,a1_0.title,a1_0.updated_datetime,a1_0.view_count,a1_0.writer from tb_announcement a1_0
webapp-1 | 2024-11-07 01:26:01,565 [tomcat-handler-19] INFO c.e.support.advice.ControllerAspect - L:26 AnnouncementGetController.getAllAnnouncements():1ms params:{}
1st test log (elapsed time 587ms)
webapp-aot-1 | 2024-11-07 01:23:42,078 [tomcat-handler-18] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-aot-1 | 2024-11-07 01:23:42,081 [Ehcache [_default_]-1] DEBUG c.e.s.configuration.CacheEventLogger - L:13 EXPIRED=key:robot old:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]] new:null
webapp-aot-1 | 2024-11-07 01:23:42,081 [tomcat-handler-18] TRACE o.s.c.interceptor.CacheInterceptor - L:490 No cache entry for key 'robot' in cache(s) [apps]
webapp-aot-1 | Hibernate: select m1_0.member_id,m1_0.password from tb_member m1_0 where m1_0.member_id=?
webapp-aot-1 | 2024-11-07 01:23:42,082 [tomcat-handler-18] DEBUG c.e.s.component.UserAccountDetails - L:37 Success find member Member(memberId=robot)
webapp-aot-1 | 2024-11-07 01:23:42,358 [tomcat-handler-18] TRACE o.s.c.interceptor.CacheInterceptor - L:1033 Creating cache entry for key 'robot' in cache(s) [apps]
webapp-aot-1 | 2024-11-07 01:23:42,358 [Ehcache [_default_]-1] DEBUG c.e.s.configuration.CacheEventLogger - L:13 CREATED=key:robot old:null new:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]]
webapp-aot-1 | Hibernate: select a1_0.announce_id,a1_0.begin_datetime,a1_0.content,a1_0.end_datetime,a1_0.inserted_datetime,a1_0.title,a1_0.updated_datetime,a1_0.view_count,a1_0.writer from tb_announcement a1_0
webapp-aot-1 | 2024-11-07 01:23:42,665 [tomcat-handler-18] INFO c.e.support.advice.ControllerAspect - L:26 AnnouncementGetController.getAllAnnouncements():1ms params:{}
2nd test log (elapsed time 166ms)
webapp-aot-1 | 2024-11-07 01:25:33,100 [tomcat-handler-20] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-aot-1 | 2024-11-07 01:25:33,100 [tomcat-handler-20] TRACE o.s.c.interceptor.CacheInterceptor - L:484 Cache entry for key 'robot' found in cache(s) [apps]
webapp-aot-1 | Hibernate: select a1_0.announce_id,a1_0.begin_datetime,a1_0.content,a1_0.end_datetime,a1_0.inserted_datetime,a1_0.title,a1_0.updated_datetime,a1_0.view_count,a1_0.writer from tb_announcement a1_0
webapp-aot-1 | 2024-11-07 01:25:33,266 [tomcat-handler-20] INFO c.e.support.advice.ControllerAspect - L:26 AnnouncementGetController.getAllAnnouncements():0ms params:{}
1st test log (elapsed time 670ms)
webapp-cds-1 | 2024-11-07 01:24:48,797 [tomcat-handler-18] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-cds-1 | 2024-11-07 01:24:48,804 [Ehcache [_default_]-1] DEBUG c.e.s.configuration.CacheEventLogger - L:13 EXPIRED=key:robot old:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]] new:null
webapp-cds-1 | 2024-11-07 01:24:48,804 [tomcat-handler-18] TRACE o.s.c.interceptor.CacheInterceptor - L:490 No cache entry for key 'robot' in cache(s) [apps]
webapp-cds-1 | Hibernate: select m1_0.member_id,m1_0.password from tb_member m1_0 where m1_0.member_id=?
webapp-cds-1 | 2024-11-07 01:24:48,807 [tomcat-handler-18] DEBUG c.e.s.component.UserAccountDetails - L:37 Success find member Member(memberId=robot)
webapp-cds-1 | 2024-11-07 01:24:49,060 [tomcat-handler-18] TRACE o.s.c.interceptor.CacheInterceptor - L:1033 Creating cache entry for key 'robot' in cache(s) [apps]
webapp-cds-1 | 2024-11-07 01:24:49,061 [Ehcache [_default_]-1] DEBUG c.e.s.configuration.CacheEventLogger - L:13 CREATED=key:robot old:null new:org.springframework.security.core.userdetails.User [Username=robot, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, CredentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]]
webapp-cds-1 | Hibernate: select a1_0.announce_id,a1_0.begin_datetime,a1_0.content,a1_0.end_datetime,a1_0.inserted_datetime,a1_0.title,a1_0.updated_datetime,a1_0.view_count,a1_0.writer from tb_announcement a1_0
webapp-cds-1 | 2024-11-07 01:24:49,467 [tomcat-handler-18] INFO c.e.support.advice.ControllerAspect - L:26 AnnouncementGetController.getAllAnnouncements():112ms params:{}
2nd test log (elapsed time 288ms)
webapp-cds-1 | 2024-11-07 01:25:12,165 [tomcat-handler-19] TRACE o.s.c.interceptor.CacheInterceptor - L:717 Computed cache key 'robot' for operation Builder[public org.springframework.security.core.userdetails.UserDetails com.example.support.component.UserAccountDetails.loadUserByUsername(java.lang.String) throws org.springframework.security.core.userdetails.UsernameNotFoundException] caches=[apps] | key='#username' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'
webapp-cds-1 | 2024-11-07 01:25:12,167 [tomcat-handler-19] TRACE o.s.c.interceptor.CacheInterceptor - L:484 Cache entry for key 'robot' found in cache(s) [apps]
webapp-cds-1 | Hibernate: select a1_0.announce_id,a1_0.begin_datetime,a1_0.content,a1_0.end_datetime,a1_0.inserted_datetime,a1_0.title,a1_0.updated_datetime,a1_0.view_count,a1_0.writer from tb_announcement a1_0
webapp-cds-1 | 2024-11-07 01:25:12,453 [tomcat-handler-19] INFO c.e.support.advice.ControllerAspect - L:26 AnnouncementGetController.getAllAnnouncements():2ms params:{}
In conclusion, Aot processed application's started time is faster than other jars at max 20 times. application jar started time using CDS is faster than pure jar,too.
it means CDS is effected properly. Aot processed application measured minimum initial response duration time of test results. however, pure jar and cds jar are similar to measure response duration time.
CDS might affect only application starting.
we used kubernetes for efficient resource management such as HPA and VPA. when extending the number of pods, we could see reduced the service ready time and minium resource usages by aot processed application.
rate limiter might be used for preventing the service from being down by huge traffic. however, it was not enough to prevent the service from being down.
In order to efficiently manage huge traffic shortly appeared and disappeared, Aot processed can be considered by GraalVM.