> For the complete documentation index, see [llms.txt](https://jeuxdeau.gitbook.io/http-the-definitive-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jeuxdeau.gitbook.io/http-the-definitive-guide/v./18.web-hosting/18.web-hosting-qna.md).

# 질문과 답변

## Q. virtual hosting 직접 시도해보기

* `joes-hardware.com`, `marys-antiques.com` 두개의 서비스를 호스팅하는 상황을 가정한다.

### setting up hosts

```
# /etc/hosts
127.0.0.1   joes-hardware.com # or www.joes-hardware.com
127.0.0.1   marys-antiques.com # or www.marys-antiques.com
```

### chrome delete dns cache

* `chrome://net-internals/#dns` - [how to clear/flush dns in chrome](https://superuser.com/questions/203674/how-to-clear-flush-the-dns-cache-in-google-chrome)

### references

* <https://www.keycdn.com/support/nginx-virtual-host>

## Q. 서버 팜, 클러스터, 그리드 컴퓨팅?

* 공통점
  * 특정 작업을 수행하기 위한 컴퓨터(노드) 들의 집합
  * 작업 수행에 필요한 부하 분산이 가능
* 차이점
  * 서버 팜과 클러스터 - load balancing, high availability 를 제공
    * 동일한 역할을 수행하는 컴퓨터들이 여러대 존재
  * 그리드 - 하나의 작업을 여러대의 컴퓨터가 병렬로 수행
    * 여러대의 컴퓨터가 각각 다른 작업(하나의 큰 작업을 분할한 것)을 수행하고 결과를 취합

> Server farm : <https://en.wikipedia.org/wiki/Server_farm>
>
> Computer cluster : <https://en.wikipedia.org/wiki/Computer_cluster>
>
> Grid computing : <https://en.wikipedia.org/wiki/Grid_computing#Comparison_of_grids_and_conventional_supercomputers>

## Q. 서버 분리 (Server Disaggregation)

출처: <http://blog.naver.com/dell_kor/221180428102>\
영어 원문: <https://blog.dellemc.com/en-us/server-disaggregation-sometimes-the-sum-of-the-parts-is-greater-than-the-whole/>\
참고: <https://www.networkworld.com/article/3266624/how-server-disaggregation-could-make-cloud-data-centers-more-efficient.html>

### 1. 가상화 이전 시대

![image](https://user-images.githubusercontent.com/22112344/76206013-a8572800-623e-11ea-9cbb-c0de4dff0022.png)

* (a): 물리 서버 한 대. CPU, SCM, GPU, FPGA, 네트워크, 스토리지 등으로 구성됨.
* (b): 하나의 어플리케이션이 하나의 물리서버와 1:1로 대응되는 모습
* (c): 서버에서 사용되지 않고 있는(underutilized) 부분을 노란색으로 표시함.&#x20;

(c)에서, 보통은 서버가 터져서 문제가 되는 것보다는 남는 게 낫기 때문에, 실제 필요한 것보다 더 많이 할당하는(overprovisioning) 문제가 발생함. 이때의 서버 사용률은 15% 미만인 경우도 있었음.

### 2. 가상화 시대

![image](https://user-images.githubusercontent.com/22112344/76206404-4ba83d00-623f-11ea-949f-1c77a5019709.png) 서버 사용률을 5-70%까지 증대시키기 위함. 허나 이러한 구조에서도 사용되지 않는 리소스는 남게 되기 때문에, 물리 서버 1-3대당 1대 정도는 남게 됨.

### 3. 서버 분리

![image](https://user-images.githubusercontent.com/22112344/76206500-7abeae80-623f-11ea-8230-61756e82c597.png) 서버 빌더는 리소스 풀에서 필요한 리소스를 가져오고, 랙 스케일 패브릭을 구성해서 리소스를 연결한다. 서버 분리는 아직 실현되지 않은 개념이고 이를 위해서는 지연(latency)이 극히 낮은 패브릭이 필요하다.

> cf. 네트워크 패브릭: <http://www.bloter.net/archives/86541>
>
> cf. Gen-Z: 패브릭 표준 [www.genzconsortium.org](http://www.genzconsortium.org)

1. 최적화: 필요한 만큼의 리소스로만 서버를 구상할 수 있음.
2. 미사용 리소스: 미사용 리소스가 생기지 않음. 미사용 리소스는 다른 서버나 서버 확장에 사용될 수 있음.
3. 독립적인 리소스 확장 : 필요한 리소스만 독립적으로 추가할 수 있음.
4. 기존 소프트웨어를 리팩토링할 필요 없음
