안녕하세요 강의 항상 잘 보고 있습니다. 다름이 아니라, 현재 Cloud front - s3 - ec2 이렇게 한개의 서버를 배포를 해둔 상황입니다. 질문1 실제 이 서버를 대상으로 부하테스트를 진행하고 싶은데, 강의에서 진행한 k6를 배포 중인 서버를 대상으로 해도 괜찮을까요? 질문2 추가적으로 궁금한게 배포 중인 서버를 대상으로 부하테스트가 가능하다고 해도 s3가 올라가있다면 부하테스트를 하는 것만으로도 비용이 발생하지 않나요?? 현업에서는 이런 상황에서 어떻게 부하 테스트를 진행하는지 궁금합니다 ! 질문3 강의에서 다루지 않았던 "애플리케이션 로직에서 비효율적인 로직 개선하기"와 관련된 상황이나 키워드좀 알 수 있을까요? 추가적으로 공부해보고 싶은데, 구체적으로 현업에서 자주 발생하는 상황이 어떤건지 잘 예상이 안됩니다 ! 질문4 강의에서는 부하 테스트를 위한 K6서버를 하나 배포해서 사용하라고 하셨는데, 이걸 맥북에서 그냥 진행해도 괜찮을까요? 왜냐하면, 맥북으로 테스트를 했을 때 유저 3천명 정도로 설정해도 에러가 발생하지 않아서 질문드립니다 ! 감사합니다 !
간단한 영화 목록 조회입니다. 총 약 10000개의 데이터가 있습니다. redis를 적용하고 조회성능이 좋아진것은 맞지만 이상하게 redis를 적용하기 전에도 같은 조회를 계속해도 조회속도가 똑같이 빨라지는 현상을 겪고있습니다. 현재 이 movie는 MSA 의 여러 서비스 중 하나입니다. 혹시 MSA 아키텍쳐 자체가 문제가 될 수도 있나요? @Cacheable(cacheNames = "getMovies", key = "'movie:all'", cacheManager = "movieCacheManager") public List<Movie> getAllMovies() { return movieRepository.findAll(); } @GetMapping("/movies") public ResponseEntity<List<MovieDto>> getAllMovies() { List<Movie> allMovies = movieService.getAllMovies(); List<MovieDto> dtos = new ArrayList<>(); for (Movie movie : allMovies) { dtos.add(new ModelMapper().map(movie, MovieDto.class)); } return ResponseEntity.status(HttpStatus.OK).body(dtos); } @Configuration @EnableCaching // Spring Boot의 캐싱 설정을 활성화 public class RedisCacheConfig { @Bean public CacheManager movieCacheManager(RedisConnectionFactory redisConnectionFactory) { RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration .defaultCacheConfig() // Redis에 Key를 저장할 때 String으로 직렬화(변환)해서 저장 .serializeKeysWith( RedisSerializationContext.SerializationPair.fromSerializer( new StringRedisSerializer())) // Redis에 Value를 저장할 때 Json으로 직렬화(변환)해서 저장 .serializeValuesWith( RedisSerializationContext.SerializationPair.fromSerializer( new GenericJackson2JsonRedisSerializer() ) ) // 데이터의 만료기간(TTL) 설정(1분) .entryTtl(Duration.ofMinutes(1L)); return RedisCacheManager .RedisCacheManagerBuilder .fromConnectionFactory(redisConnectionFactory) .cacheDefaults(redisCacheConfiguration) .build(); } } @Configuration public class RedisConfig { @Value("${spring.data.redis.host}") private String host; @Value("${spring.data.redis.port}") private int port; @Bean public LettuceConnectionFactory redisConnectionFactory() { return new LettuceConnectionFactory(new RedisStandaloneConfiguration(host, port)); } }
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50) ~[spring-boot-devtools-3.5.3.jar:3.5.3] Caused by: org.springframework.data.redis.listener.adapter.RedisListenerExecutionFailedException: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis at org.springframework.data.redis.listener.RedisMessageListenerContainer.lazyListen(RedisMessageListenerContainer.java:383) ~[spring-data-redis-3.5.1.jar:3.5.1] at org.springframework.data.redis.listener.RedisMessageListenerContainer.start(RedisMessageListenerContainer.java:361) ~[spring-data-redis-3.5.1.jar:3.5.1] at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:405) ~[spring-context-6.2.8.jar:6.2.8] ... 19 common frames omitted Caused by: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1858) ~[spring-data-redis-3.5.1.jar:3.5.1] at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1789) ~[spring-data-redis-3.5.1.jar:3.5.1] at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceC Redis 에러 (백엔드 에러는 이렇게 뜨고) 프론트 엔드 (로그인 하고 들어가는 거 잘됩니다. 채팅만 치면 저렇게 뜹니다.) EC2에서 redis 접속은 잘 됩니다. 프론트는 S3+cloudfront (도메인 적용 안함) 백엔드는 Redis(Elastic) + EC2+RDS +nginx 로 배포했고 몇시간 쨰 하는데 저 에러가 뜹니다. 혹시 프론트 배포가 잘 못 된건가요? 강사님 도와주세여ㅠㅠㅠ
Caused by: org.springframework.data.redis.listener.adapter.RedisListenerExecutionFailedException: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis at org.springframework.data.redis.listener.RedisMessageListenerContainer.lazyListen(RedisMessageListenerContainer.java:383) ~[spring-data-redis-3.5.1.jar:3.5.1] at org.springframework.data.redis.listener.RedisMessageListenerContainer.start(RedisMessageListenerContainer.java:361) ~[spring-data-redis-3.5.1.jar:3.5.1] at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:405) ~[spring-context-6.2.8.jar:6.2.8] ... 19 common frames omitted Caused by: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1858) ~[spring-data-redis-3.5.1.jar:3.5.1] at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1789) ~[spring-data-redis-3.5.1.jar:3.5.1] at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1586) ~[spring-data-redis-3.5.1.jar:3.5.1] at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.lambda$getConnection$0(LettuceConnectionFactory.java:1566) ~[spring-data-redis-3.5.1.jar:3.5.1] at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.doInLock(LettuceConnectionFactory.java:1527) ~[spring-data-redis-3.5.1.jar:3.5.1] 위에꺼는 백엔드 서버 에러이고 밑에는 프론트엔드 서버 에러입니다. 안녕하세요 강사님 채팅 서버와 프론트를 배포를 해서 Elastic Cache를 이용을 하고 있는데 EC2 랑 연결이 잘 되어 있으면서도 이런 에러가 뜹니다. 아무리 찾아봐도 더 해결사항이 보이지 않아 질문드립니다.
선생님 코드 복붙했는데 어느 부분이 틀린지 잘 모르겠습니다. class RedisCacheConfig 부분에서 RedisConnectionFactory redisConnectionFactory 이 부분이 에러가 나고 class BoardService애서 cacheManager = "boardCacheManager" 여기서도 에러가 납니다. 파일 첨부합니다.
안녕하세요, 좋은 강의제공 감사드립니다! 강의 듣다가 실무적용할때 궁금한점이 있어서 질문남겨봅니다. 결제와 같이 성능테스트 대상으로 삼기 애매한 API에 대한 테스트 방법이 궁금합니다. api 호출 시 결제가 이루어진다거나 타 제휴사 api 를 친다거나 하는 경우 성능테스트를 진행해버리면 문제가 생기지 않을까 싶은데요, 이런경우에는 보통 어떻게 성능테스트를 진행하고 병목구간을 찾아야 할까요? 감사합니다:D