Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
1
  • Loading branch information
winesoft committed Jan 27, 2021
1 parent 16013df commit 9118fe5
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 1 deletion.
52 changes: 52 additions & 0 deletions admin/caching_policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,58 @@ URL마다 별도로 TTL을 설정한다.
결합조건(&)을 지원하며, 부정조건(!)은 지원하지 않는다.


.. _caching-policy-customttl-cron:

TTL 만료시간 지정
---------------------

`Custom TTL`_ 을 확장하여 TTL 만료시간을 지정할 수 있다. ::

# /svc/www.example.com/ttl.txt
# {Match}, {TTL}, {minute hour} 순서로 표기한다.

# 자정(00시 00분)에 TTL을 만료한다.
/events/*, 86400, 0 0

# 22시 38분에 TTL을 만료한다.
/foo/bar, 86400, 38 22

# 매 시간마다 TTL을 만료한다.
/index.html, 86400, 0 *

# 5분마다 TTL을 만료한다.
/script/*.js, 86400, */5 *

# 매 6시간마다 TTL을 만료한다.
/image/ad.jpg, 86400, 0 */6

예제의 ``{TTL}`` 값이 86400인 이유는 TTL을 설정할 때 ``{TTL}`` 과 ``{minute hour}`` 중 작은 값을 선택하기 때문이다. ::

/api/v1/*, 30
/api/v2/*, 30, * *


예를 들어 위 설정의 경우 요청(=캐싱)시간을 기준으로 만료시간이 작은 값을 기준으로 설정된다.

=========== ============================ ===============
패턴 요청시간 만료시간
=========== ============================ ===============
/api/v1/* 1:15:10 1:15:40
/api/v1/* 1:15:40 1:16:10
/api/v2/* 1:15:10 1:15:40
/api/v2/* 1:15:40 1:16:00
=========== ============================ ===============



.. note::

설정을 변경해도 이미 캐싱된 객체의 TTL이 변경되지는 않는다.
TTL은 객체가 초기화(=캐싱) 되는 시점에 고정되기 때문이다.



TTL 우선순위
---------------------

Expand Down
9 changes: 9 additions & 0 deletions admin/handling_http_requests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,13 @@ Expires조건은 /svc/{가상호스트 이름}/expires.txt에 설정한다. ::

원본서버가 보낸 Max-Age가 없거나, 값이 0인 경우 Expire헤더를 붙이지 않는다.

``#TTL_LEFT`` 키워드를 통해 콘텐츠가 만료되는 시간을 Expires 헤더의 값으로 명시한다.
기준 설정이 ``access`` 인 경우에만 동작한다. ::

/*, #TTL_LEFT, access

원본서버가 보낸 Max-Age가 없거나, 값이 0인 경우 Expire헤더를 붙이지 않는다.


ETag 헤더
---------------------
Expand Down Expand Up @@ -548,6 +555,7 @@ Value가 입력되지 않은 경우 빈 값("")이 입력된다.
``#PORT`` 클라이언트가 접속한 포트. ``80`` , ``443`` 등
``#CACHEHIT`` :ref:`adv_topics_req_hit_ratio` 의 상세코드
``#SESSIONID`` :ref:`admin-log-access` 의 ``session-id``
``#HOSTNAME`` 호스트 이름
========================== =============================================================

::
Expand All @@ -557,6 +565,7 @@ Value가 입력되지 않은 경우 빈 값("")이 입력된다.
$URL[*], $ORGREQ[X-Client-Forwarded-Port: #PORT], set
$URL[*], $RES[X-Cache-Result: #CACHEHIT], set
$URL[*], $RES[X-Cache-Sessionid: #SESSIONID], set
$URL[*], $RES[X-Cache-Hostname: #HOSTNAME], set



Expand Down
2 changes: 2 additions & 0 deletions admin/log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,8 @@ Origin 로그
- ``recovery`` :ref:`origin_exclusion_and_recovery` 에서 복구용도로 사용된 세션
- ``healthcheck`` :ref:`origin-health-checker` 가 사용한 세션

- ``time-sock-creation (단위: ms)`` - 소켓 생성 소요시간
- ``x-cs-retry`` - 해당 세션 Retry 상태 (Retry 시 ``Y`` , Retry 하지 않았다면 ``N`` )


.. _admin-log-image:
Expand Down
3 changes: 3 additions & 0 deletions admin/origin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,9 @@ If-Range 헤더에 의해 원본서버가 ``206 Partial Content`` 가 아닌 ``2
# $REQ.header-name을 이용해 클라이언트 요청을 원본으로 보낼 수 있다.
$URL[/account/], $ORGREQ[cookie: $REQ.Cookie], set

# #HOSTNAME 키워드를 통해 요청을 보내는 호스트(서버) 이름을 헤더에 추가한다.
$URL[*], $ORGREQ[X-Req-Hostname: #HOSTNAME], set


.. note::

Expand Down
24 changes: 24 additions & 0 deletions admin/releasenote_enterprise.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,33 @@
Appendix F: 릴리스 노트 ``[Enterprise]``
***********************

.. note::

2021년부터 ``Enterprise Edition`` 은 `M2 <https://m2-kr.readthedocs.io/ko/latest/>`_ 로 통합됨을 알려 드립니다.



v20.x
====================================

20.12.0 (2021.1.28)
----------------------------

**기능개선/정책변경**

- SSL Library(OpenSSL) 버전 업데이트
- :ref:`caching-policy-customttl-cron` 기능 추가
- :ref:`admin-log-origin` 에 ``time-sock-creation`` , ``x-cs-retry`` 필드 추가
- :ref:`handling_http_requests_modify_client` , :ref:`origin_modify_client` - ``#HOSTNAME`` 예약어 추가
- :ref:`handling_http_requests_cache_control_expires` - 남은 TTL 정보를 알려주는 ``#TTL_LEFT`` 예약어 추가
- [WM] 가상호스트 삭제 시 가상호스트 이름 표시


**버그수정**

- :ref:`adv-vhost-redirection-trace` 과 :ref:`origin_modify_client` 을 함께 사용 할 경우 비정상 종료 되는 문제 수정



20.11.0 (2020.11.24)
----------------------------
Expand Down
3 changes: 2 additions & 1 deletion index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@ STON Edge Server 완벽 가이드
admin/stontop
admin/cacti
admin/dynpage_exception.rst
admin/releasenote.rst
admin/releasenote.rst
admin/releasenote_enterprise.rst

0 comments on commit 9118fe5

Please sign in to comment.