이 다이어그램은 두 개의 Knative serving 서비스(Service A 및 Service B)가 포함된 Google Cloud 프로젝트를 보여줍니다. 각 서비스에는 여러 버전이 있습니다.
이 다이어그램에서 볼 수 있듯이 Service A에는 수신되는 요청이 많기 때문에 여러 컨테이너 인스턴스가 시작되고 실행되고 있습니다. Service B에는 현재 수신되는 요청이 없으므로 아직 컨테이너 인스턴스가 시작되지 않았습니다.
Knative serving 서비스
이 서비스는 Knative serving의 기본 리소스입니다.
각 서비스는 특정 GKE 클러스터 네임스페이스에 있습니다.
특정 Google Cloud 프로젝트는 여러 리전 또는 GKE 클러스터에서 여러 서비스를 실행할 수 있습니다.
각 서비스는 고유한 엔드포인트를 노출하고 기본 인프라를 자동으로 확장하여 수신 요청을 처리합니다.
Knative serving 버전
서비스에 배포할 때마다 버전이 생성됩니다. 버전은 특정 컨테이너 이미지 외에 환경 변수, 메모리 한도, 동시 실행 값과 같은 환경 설정으로 구성됩니다.
버전은 변경할 수 없습니다. 버전이 생성된 후에는 이를 수정할 수 없습니다. 예를 들어 새 Knative serving 서비스에 컨테이너 이미지를 배포하면 첫 번째 버전이 생성됩니다. 그런 다음 동일한 서비스에 다른 컨테이너 이미지를 배포하면 두 번째 버전이 생성됩니다. 이후에 환경 변수를 설정하면 세 번째 버전이 생성됩니다.
요청은 최근에 생성된 정상적인 서비스 버전으로 최대한 빨리 자동으로 라우팅됩니다. 필요에 따라 서로 다른 버전 간에 트래픽을 분할할 수 있습니다.
Knative serving 컨테이너 인스턴스
요청을 수신하는 각 버전은 이러한 모든 요청을 처리하는 데 필요한 컨테이너 인스턴스 수로 자동 확장됩니다. 즉, 컨테이너 인스턴스 한 개가 동시에 여러 요청을 처리할 수 있습니다. 동시 실행 설정을 사용하면 특정 컨테이너 인스턴스에 동시에 전송할 수 있는 최대 요청 수를 설정할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-11-21(UTC)"],[],[],null,["# Resource model\n\nThe following diagram shows the Knative serving resource model:\n\nThe diagram shows a Google Cloud project containing two Knative serving\nservices, `Service A` and `Service B`, each of which has several revisions.\n\nIn the diagram, `Service A` is receiving many requests, which results in the\nstartup and running of several container instances. Note that `Service B` is\nnot currently receiving requests, so no container instance is started yet.\n\nKnative serving services\n------------------------\n\nThe service is the main resource of Knative serving.\nEach service is located in a specific [GKE cluster namespace](/blog/products/gcp/kubernetes-best-practices-organizing-with-namespaces).\n\nA given Google Cloud project can run many services in different regions or\nGKE clusters.\n\nEach service exposes a unique endpoint and automatically scales the underlying\ninfrastructure to handle incoming requests.\n\nKnative serving revisions\n-------------------------\n\nEach deployment to a service creates a revision. A revision consists of a\nspecific container image, along with environment settings such as environment\nvariables, memory limits, or concurrency value.\n\nRevisions are immutable: once a revision has been created, it cannot be\nmodified. For example, when you deploy a container image to a new\nKnative serving service, the first revision is created. If you then deploy a\ndifferent container image to that same service, a second revision is created. If\nyou subsequently set an environment variable, a third revision is created, and so\non.\n\nRequests are automatically routed as soon as possible to the latest healthy\nservice revision. You can\n[split traffic](/kubernetes-engine/enterprise/knative-serving/docs/rollouts-rollbacks-traffic-migration#split-traffic)\nbetween different revisions as desired.\n\nKnative serving container instances\n-----------------------------------\n\nEach revision receiving requests is automatically scaled to the number of\ncontainer instances needed to handle all these requests. Note that a container\ninstance can receive many requests at the same time. With the\n[concurrency setting](/kubernetes-engine/enterprise/knative-serving/docs/configuring/concurrency), you can set the\nmaximum number of requests that can be sent in parallel to a given container\ninstance."]]