Go 1.11은 지원이 종료되었으며 2026년 1월 31일에
지원 중단됩니다. 지원 중단 후에는 조직에서 이전에 조직 정책을 사용하여 레거시 런타임의 배포를 다시 사용 설정한 경우에도 Go 1.11 애플리케이션을 배포할 수 없습니다. 기존 Go 1.11 애플리케이션은
지원 중단 날짜 이후에도 계속 실행되고 트래픽을 수신합니다.
지원되는 최신 Go 버전으로 마이그레이션하는 것이 좋습니다.
Go에서 push 큐 사용
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 페이지에서는 push 큐를 간략히 설명합니다. Push 큐는 App Engine 작업자 서비스에 HTTP 요청을 전달하여 태스크를 실행합니다. 요청은 일정한 속도로 전달됩니다. 태스크가 실패하면 서비스는 다른 요청을 보내 태스크를 다시 시도합니다. 사용하는 모든 종류의 태스크에 핸들러를 제공해야 합니다. 단일 서비스에 다양한 종류의 태스크를 위해 핸들러가 여러 개일 수 있습니다. 또는 서로 다른 서비스를 사용하여 여러 태스크 유형을 관리할 수 있습니다.

태스크 기한
작업자 서비스가 push 태스크 요청을 받으면 작업자 서비스의 확장 유형에 따른 기한 전에 요청을 처리하고 HTTP 응답을 보내야 합니다.
자동 확장 서비스는 10분 이내에 완료되어야 합니다.
수동 및 기본 확장 서비스는 최대 24시간 실행될 수 있습니다.
200~299 사이의 HTTP 응답 코드는 태스크가 성공했음을 나타내며 그 밖의 값은 실패했음을 나타냅니다. 태스크가 기한 내에 응답하지 않거나 잘못된 응답 값을 반환하면 태스크가 다시 시도됩니다.
실패한 태스크 다시 시도
push 태스크 요청 핸들러가 200~299 범위를 벗어나는 HTTP 상태 코드를 반환하거나 태스크 기한 전에 응답을 반환하지 않으면 큐는 성공할 때까지 태스크를 다시 시도합니다. 시스템은 애플리케이션에 너무 많은 요청이 발생하지 않도록 재시도 횟수를 점진적으로 줄이지만, 실패한 태스크에 대한 재시도는 한 시간에 최소한 한 번 반복되도록 예약합니다.
Push 큐 태스크
Push 큐로 작업하는 경우, 최소한 다음 태스크를 수행해야 합니다.
다음 작업도 가능합니다.
Push 큐를 사용하면 애플리케이션에 추가 할당량이 적용됩니다.
다음 단계
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-04(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003ePush queues manage tasks by sending HTTP requests to App Engine worker services at a consistent rate, retrying any failed tasks.\u003c/p\u003e\n"],["\u003cp\u003eWorker services must respond to push task requests with an HTTP status code between 200-299 within a specific deadline, which varies from 10 minutes for automatic scaling to 24 hours for manual or basic scaling.\u003c/p\u003e\n"],["\u003cp\u003eUsing push queues involves creating tasks and assigning them to queues, along with writing handlers within an App Engine service to process these tasks.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize push queues to effectively perform various tasks, as well as monitor and manage these queues through the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003ePush queues are supported for first-generation runtimes, with a migration path for users upgrading to second-generation runtimes, requiring a review of the migration options for legacy bundled services.\u003c/p\u003e\n"]]],[],null,["# Using Push Queues in Go\n\nThis page provides an overview of push queues. Push queues run tasks by\ndispatching HTTP requests to App Engine worker services. The requests are\ndelivered at a constant rate. If a task fails, the service retries the task,\nsending another request. You must provide a handler for every kind of task you\nuse. A single service can have multiple handlers for different kinds of tasks, or\nyou can use different services to manage different task types.\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| go\n| /services/access). If you are updating to the App Engine Go 1.12+ runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/go-differences) to learn about your migration options for legacy bundled services.\n\nThe task deadline\n-----------------\n\nWhen a worker service receives a push task request, it must handle the request\nand send an HTTP response before a deadline that depends on the [scaling\ntype](/appengine/docs/legacy/standard/go111/an-overview-of-app-engine#instances)\nof the worker service.\n\nAutomatic scaling services must finish before 10 minutes have elapsed.\nManual and basic scaling services can run up to 24 hours.\n\nAn HTTP response code between 200--299 indicates success; all other values\nindicate the task failed. If the task fails to respond within the deadline, or\nreturns an invalid response value, the task is retried.\n\nRetrying a failed task\n----------------------\n\nIf a push task request handler returns an HTTP status code outside the range\n200--299, or fails to return any response before the task deadline occurs, the queue\nretries the task until it succeeds. The system backs off gradually to\navoid flooding your application with too many requests, but schedules retry\nattempts for failed tasks to recur at a minimum of once per hour.\n\nWorking with push queues\n------------------------\n\nWhen working with push queues, at a minimum, you'll need to do the following things:\n\n- [Create tasks\n programmatically](/appengine/docs/legacy/standard/go111/taskqueue/push/creating-tasks) and add them to the default push queue, or to one or more named push queues that you have created.\n- [Write a\n handler](/appengine/docs/legacy/standard/go111/taskqueue/push/creating-handlers) that processes a task's request, and assign the handler to an App Engine service.\n\nOptionally, you can also:\n\n- [Create and customize multiple\n queues](/appengine/docs/legacy/standard/go111/taskqueue/push/creating-push-queues) to perform multiple tasks efficiently.\n- [Monitor and manage](/appengine/docs/legacy/standard/go111/taskqueue/push/creating-push-queues#monitoring_queues_in_the_console_name_short) your push queues in the Google Cloud console.\n\nWhen you use push queues, your application is subject to additional\n[quotas](/appengine/docs/quotas#Task_Queue).\n\nWhat's next\n-----------\n\n- Learn how to [create push queues](/appengine/docs/legacy/standard/go111/taskqueue/push/creating-push-queues)\n- Learn how to [create tasks](/appengine/docs/legacy/standard/go111/taskqueue/push/creating-tasks)\n- Learn about [writing handlers](/appengine/docs/legacy/standard/go111/taskqueue/push/creating-handlers)\n- Look at an [example](/appengine/docs/legacy/standard/go111/taskqueue/push/example)"]]