-
2021.08.30~09.01 기록장TIL 2021. 8. 29. 23:22
ToDo
- 토이 프로젝트
- 책 읽기
Done
- 책 읽기
Weekly goal
- 책 읽기
C10K 문제
하드웨어 성능상에 문제가 없어도 클라이언트 수가 많아지면 서버가 고장 나는 문제.
이유는 클라이언트 접속마다 프로세스를 생성하면 디스크립터나 프로세스 수가 최대치에 이르거나, 메모리가 사용량을 초과하기에 발생. 또한 컨텍스트 스위칭에서 발생하는 CPU 사용량이 문제가 될 수 있다.
gradle 설정 중
기존에 사용하던 dependencies 블럭 말고 dependencyManagement블록을 사용했다.
먼저 mavenBom이 의미하는 것은 공통된 버전 명시라고 이해하면 된다.
gradle의 plugins에 spring 버전 명시를 하면 호환되는 것을 가져오는 것과 비슷하다.
dependencyManagement는 중앙에서 관리를 한다. bom file은 dependencyManagement 속에 사용되는 pom 파일일 뿐이다.
dependencyManagement을 통해 bom을 정의할 수도 import 할 수도 있다. 위의 경우는 후자이다.
https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/
Dependency Management Plugin
Gradle’s maven and maven-publish plugins automatically generate a pom file that describes the published artifact. The plugin will automatically include any global dependency management, i.e. dependency management that does not target a specific configura
docs.spring.io
https://hungrydiver.co.kr/bbs/detail/develop?id=91
Spring Boot 와 Spring Cloud 버전 결정
hungrydiver.co.kr
https://www.baeldung.com/spring-maven-bom
spring security
csrf 문제 해결법
csrf는 악의적인 사이트가 특정 사이트인척 속이고 요청을 보내는 것이다.
1. Synchronizer Token Pattern을 사용한다.
멱등성을 보장하는 method가 아닌 ex. post 같은 http요청 시 헤더 또는 파라미터에 특정 토큰을 넣고 server에서 비교하는 것이다.
이러면 올바른 사이트에서 온것인지 확인이 가능하다.
https://docs.spring.io/spring-security/site/docs/current/reference/html5/#csrf-protection-idempotent
Spring Security Reference
In Spring Security 3.0, the codebase was sub-divided into separate jars which more clearly separate different functionality areas and third-party dependencies. If you use Maven to build your project, these are the modules you should add to your pom.xml. Ev
docs.spring.io
2.
SameSite Attribute로 같은 쿠키에 허용된 domain을 명시한다
'TIL' 카테고리의 다른 글
2021.09.03~04 기록장 (0) 2021.09.02 2021.09.02 기록장 (0) 2021.09.01 2021.08.29 기록장 (0) 2021.08.28 2021.08.27~28 기록장 (0) 2021.08.26 2021.08.26 기록장 (0) 2021.08.25