qwlake's Blog

어서오세요, 반갑습니다 :)

[CS] iterator

iterator iterator는 해당 collection 객체를 참조한다. (shallow copy) → 값을 조작하려면 객체 내부값(필드)을 조작해야 한다. iterator 사용시 collection 객체에 대해 add나 remove를 막아놓은 이유 → iterator가 참조하던 위치가 틀어지기 때문 → 막는 방법: iterator.nex...

[CS] Pubsub

Pubsub Spring Integration; Spring에서 lightweight messaging을 가능하게 하고 외부 어플리케이션과 통신할 수 있는 수단을 제공한다 Spring Integration docs.spring.io Producer-Consumer Pattern과 비슷하지만, 해당 패턴의 경우 다음의 문제점이 있음 여러 ...

[Docker] Docker-compose auto-start after lauching AWS EC2 server

Enable docker daemon 1 sudo systemctl enable docker Add restart option to docker-compose.yml 1 2 3 4 5 6 7 8 9 10 11 12 13 web: restart: always build: . container_name: web01 c...

[Django] Django auto reload (with. gunicorn '--reload' option)

When you work on django in docker, sometimes it’s not might be autoload. I have been shutdown and restart the docker-compose process, but, there is cool way. Mount code volumes into django imag...

[Server] Server shutdown problem - Django memory leak with scrapy

Finding reasons Add logging system to Django project. → Found Reason 1. Add AWS EC2 instance memory monitor to cloud watch. → Found Reason 2. https://brunch.co.kr/@topasvga/615 Reason 1. 1...

[Django] 장고 서버 locust로 부하 테스트

사진 설명 차트1 (Total Requests per Second) green line: RPS, red line: Failures/s 차트2 (Response Times (ms)) green line: Medium Response Time, yellow line: 95% percentile 차트3(Number of Users) green l...

[MSA] k8s 간단 개념 정리

쿠버네티스 #2 - 개념 이해 (1/2) 기본 오브젝트 Pod 이미지 → 도커 프로세스 생성(컨테이너) 여러 개의 컨테이너가 네트워크를 구성 → docker-compose docker-compose → pod Volume 각 컨테이너 내에서는 각자의 저장 공간을 갖는데 → 이는 일시적인 공간. 종료하면 사라짐 → pod 내부의 공용 공...

[Spring] Spring Boot 에서 gRPC로 크롤링 MS 호출하기 - IntelliJ 설치부터 스프링부트 개념과 도커를 통한 실행까지

IntelliJ https://freehoon.tistory.com/147 Spring Boot 시작하기 https://start.spring.io/ https://spring.io/guides/gs/spring-boot/ actuator https://jeong-pro.tistory.com/160 To Docker https://spr...

[MSA] 크롤링 모듈 MS(Micro Service)로 포팅해서 gRPC 서버로 만들기 - gRPC 예제 링크와 gRPC 서버, gRPC 클라이언트 실행방법

gRPC https://grpc.io/docs/languages/python/quickstart/ https://grpc.io/docs/languages/python/basics/ 1 python -m grpc_tools.protoc -I ../protos --python_out=. --grpc_python_out=. ../protos/crawl...

[Scrapy] xpath, css selector 안 먹는 현상 해결 - Dynamic content 크롤링 하기

서론 Scrapy를 사용하다보면 가끔 xpath와 css selector가 제대로 동작하지 않는 현상을 볼 수 있다. 분명 크롬에서 개발자모드를 켜서 가져온 경로는 제대로된 경로가 맞는데, Scrapy에서는 먹히지 않는다. 이는 우리가 크롬에서 보는 화면이 동적 콘텐츠(Dynamic contents)가 포함된 화면이기 때문이다. Dynamic co...