# 서비스 운영(성능/가용성)

## 1. 성능 관점에서 생각해보기

### Java 성능

* JVM
* GC
* 자료구조

### RDB 성능

* 읽기와 쓰기를 구분하는 것
* pull 모델, push 모델
* PK (MySQL 에서는 특히 더 중요)
* 인덱스
* 트랜잭션
* JPA
  * 쿼리 튜닝
  * Open Session In View : 개발 편의성과 데이터 베이스의 커넥션 관리 사이의 트레이드 오프&#x20;

### JPA 성능 최적화

[object relational mapping](/second-brain/second-brain/spring/jpa-orm.md)

[JPA N+1 문제](/second-brain/technical/trouble-shooting/jpa-n+1.md)

임의의 PK를 사용할 경우 Persistable 인터페이스를 재정의 하여 새로 생성된 엔티티가 merge() 로 insert 되어 불필요한 search 쿼리가 발생하지 않도록 한다.

### 캐싱

* 캐싱 전략

[cache](/second-brain/second-brain/computer-science/cache.md)

[redis](/second-brain/second-brain/distributed-system/redis.md)

### 분산 환경

* 시스템의 복잡성을 관리하는 기술
* 분산된 환경을 통합(integration) 하는 방법, 메시지. 이벤트 드리븐
* MSA

[distributed system](/second-brain/second-brain/distributed-system.md)

## 2. 가용성 관점에서 생각해보기

### HA 구성

### 재시도

### DR 장애 극복

***

## 3. DevOps

### 모니터링

* 성능 개선이 필요한 부분을 알아내기 위함

[monitoring](/second-brain/second-brain/devops/monitoring.md)

### H/W

[NUMA Architecture](/second-brain/second-brain/devops/infra/numa-architecture.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://programmer-jjy.gitbook.io/second-brain/today-i-learned/deep-dive/service-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
