Translated message

A translation of this page exists in English.

httpd 및 Jboss의 동시 요청 수가 초과할 경우 어떻게 요청 수를 제한하고 에러 페이지를 보여주나요?

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Issue

  • EWS나 mod_cluster (혹은 mod_jk)가 제공하는 요청 제한 기능을 제공 하나요? 예를 들면 동시에 100명의 유저가 Jboss EAP로 접속
    제한을 할 경우, EWS나 mod_cluster (혹은 mod_jk)에서 요청이 초과한다면 유저들을 다른 페이지로 리다이렉션 할 수 있는 설정이 있을까요?

  • JBoss server에서 최대 제공 할 수 있는 http 요청 수의 변경 방법은 어떻게 되나요?

  • JBoss EAP 6.2에서 HTTP 세션 수량을 제한하고, HTTP 세션을 Datasource의 최대 풀 사이즈와 일치하도록 하는 방법이 있을까요?

  • JBoss EAP 6.2에서 어떻게 구현 할 수 있을까요?

Resolution

  • Jboss가 수행할 수 있는 최대 요청 수량을 설정하기 위해서는 max-connections의 속성을 CLI를 사용하여 커넥터에 아래와 같이 구현합니다.
[standalone@localhost:9999 /] /subsystem=web/connector=http:write-attribute(name=max-connections,value=100)
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}

사용자는 이 값을 요청 한 바와 같이 "100"으로 변경할 수 있습니다.

  • 만약 많은 커넥션이 들어오게 된다면, 503 에러가 반환될 것입니다.

  • 사용자는 custom-error.html에 기술된 바와 같이 httpd에서 사용자 에러 페이지를 ErrorDocument 지시어를 통해 구성할 수 있습니다.

  • 예시는 다음과 같습니다:

ErrorDocument 503 /too-many-users.html

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments