웹 서비스 사용량 최적화
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
중요: Google Maps Platform 프리미엄 플랜은 이제 가입이 불가능하며 신규 고객에게 제공되지 않습니다.
개요
애플리케이션에서 Google Maps Platform
웹 서비스에 지정된 사용량 한도를 초과하면 서비스에서 오류 메시지를 반환합니다. 애플리케이션에서
사용량 한도를 계속 초과하는 경우 웹 서비스에 액세스할 수 없도록 차단되고
경우에 따라 '403 Forbidden' 응답을 받게 됩니다.
애플리케이션의 웹 서비스 요청에서 오류 메시지가 수신되는 경우 웹 서비스를 더 효율적으로 사용하도록
애플리케이션을 최적화하여 사용량을 줄일 수 있습니다.
시작하기 전에
애플리케이션의 웹 서비스 사용량을 최적화하기 전에 사용 사례에 맞는 서비스와 올바른 지도 API 라이선스를 사용하고 있는지 확인하세요.
사용 사례 검사
Google Maps Platform 웹 서비스는 실시간 입력이 필요하지 않은 애플리케이션에 가장 적합합니다.
웹 브라우저를 사용하지 않는 경우에 발생할 수 있습니다. 예를 들어
애플리케이션이 사용자 입력과 독립적인 데이터 세트(예: 고정 세트)를 사용하는 경우
지오코딩해야 하는 부동산 웹사이트의 주소 개수입니다.
웹 서비스에서는 분당 쿼리 수 (QPM) 제한이
프리미엄 플랜 라이선스(IP 주소 수와 관계없음)
요청을 전송하는 소스입니다
반면에 Maps JavaScript API와 함께 사용할 수 있는 클라이언트 측 서비스는 브라우저 세션당 한도가 제한되므로 요청이 모든 사용자에게 분산되고 사용자 수가 증가하면 규모가 확장됩니다. 따라서 클라이언트 측 서비스는 사용자의 집 주소 근처에 있는 매장을 검색하는 매장 검색 기능과 같이 사용자의 주소 입력을 실시간으로 지오코딩하는 애플리케이션에 가장 적합합니다.
웹 서비스를 사용해야 하는 경우에 대한 자세한 내용은 지오코딩 전략을 참고하세요. 지오코딩을 예로 들었지만 서버 측 웹 서비스 또는 이와 동등한 클라이언트 측 서비스를 사용해야 하는 경우에 대한 이 문서의 설명은 모든 웹 서비스에 적용됩니다.
웹 서비스 사용량을 최적화하는 방법
웹 서비스를 더 효율적으로 사용하기 위해 필요할 때만 요청을 보내고 사용량을 한도 미만으로 균등하게 분산하여 사용량을 줄일 수 있습니다.
결과 캐시
Google Maps Platform 서비스 약관의 3.2.3.a 및 b
항에는 약관에 명시된 제한 조건을 제외하고
어떠한 콘텐츠도 미리 가져오거나 색인을 생성하거나 저장 또는 캐시해서는 안 된다고 명시되어 있습니다.
장소를 고유하게 식별하는 데 사용되는 장소 ID는
캐싱 제한에서 제외됩니다. 따라서 장소 ID 값은 무제한으로 저장할 수 있습니다.
요청 제한
사용량 한도를 초과하지 않기 위해 요청이 전송된 시간을 추적하는 대기열 요청을 추가하여 요청을 제한하도록 애플리케이션을 구성할 수 있습니다. 애플리케이션이
QPM 한도 이상으로 1개의 추가 요청을 수신하는 경우 쿼리 속도를 조정하세요. 코드에서 쿼리 간 대기 시간 **`S`** 초를 추가합니다. 쿼리에서 여전히 할당량 오류가 발생하는 경우 대기 기간을 두 배로 늘린 후 다른 쿼리를 보내세요. 쿼리가 오류 없이 반환될 때까지 대기 시간을 계속 조정하세요.
요청을 제한해도 애플리케이션에서 여전히 상태 코드가 OVER_QUERY_LIMIT
인 응답을 받을 수도 있습니다. 이러한 응답을 받는 경우 짧은 지연 시간(20밀리초) 후에 다시 시도하도록 애플리케이션을 구성하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThe Google Maps Platform Premium Plan is no longer available for new customers.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Maps Platform web services are best suited for applications with non-real-time data and fixed datasets, like geocoding addresses on a real estate website.\u003c/p\u003e\n"],["\u003cp\u003eClient-side services, like the Maps JavaScript API, are recommended for applications requiring real-time user interaction, such as store locators.\u003c/p\u003e\n"],["\u003cp\u003eOptimize web service usage by caching allowed data like place IDs and throttling requests to stay within usage limits.\u003c/p\u003e\n"],["\u003cp\u003eIf exceeding usage limits, adjust request frequency and incorporate delays to prevent service disruptions and errors.\u003c/p\u003e\n"]]],[],null,["**Important:** The Google Maps Platform Premium Plan is no longer available for\nsign up or new customers.\n\nOverview\n\nIf your application exceeds the usage\nlimits for a Google Maps Platform web service, the service returns an error message. If your\napplication continues to exceed the usage limits, it might be blocked from accessing the\nweb service and, in some cases, receive \"403 Forbidden\" responses.\n\nIf your application's web service requests receive error messages, you can lower usage by\noptimizing applications to use the web services more efficiently.\n\nBefore you begin\n\nBefore optimizing your application's web service usage, check that you're using the correct\nservice for your use case and the correct Maps APIs license.\n\nValidate your use case\n\nGoogle Maps Platform web services are best for applications that don't require real-time input\nfrom users or when a web browser is not used. For example, you should use web services if your\napplication uses a dataset that is independent of user input---for example, a fixed set\nof addresses on a real estate website that needs to be geocoded.\n\nNote that with web services, the queries-per-minute (QPM) limit applies to your\nPremium Plan license, regardless of how many IP addresses\nrequests are sent from.\n\nOn the other hand, the client-side services available with the Maps JavaScript API\nare rate limited per browser session, so that requests are distributed across all your users and\nscale as the number of users grows. Therefore, client-side services are best for applications\nthat geocode address input from users in real time, such as a store locator that searches for\nstores near a user's home address.\n\nFor a more detailed discussion on when to use web services, see [Geocoding\nStrategies](/maps/documentation/geocoding/geocoding-strategies). Although specific to geocoding, the recommendations in this\ndocument apply to all web services, explaining when you should use server-side\nweb services or their client-side equivalents.\n\nHow to optimize web service usage\n\nTo use web services more efficiently, you can lower usage by sending requests only when\nnecessary and spreading usage evenly to keep it under the limits.\n\nCache results\n\nSections [3.2.3.a and b](https://cloud.google.com/maps-platform/terms/#3.-license.)\nof the Google Maps Platform Terms of Service states that you must not pre-fetch, index, store, or cache any Content\nexcept under the limited conditions stated in the Terms.\n\nNote that the **place ID** , used to uniquely identify a place, is **exempt\nfrom** the caching restriction. You can therefore store place ID values indefinitely.\n\nThrottle requests\n\nTo avoid exceeding usage limits, you can configure your application to throttle requests, by\nplacing them in a queue that keeps track of when the requests are sent. If your application\nreceives one additional request beyond the QPM limit, adjust the pace of your queries. In your code, add a waiting period of \\*\\*\\`S\\`\\*\\* seconds between queries. If the query still results in a quota error, double the waiting period and then send another query. Continue adjusting the waiting period until the query returns without an error.\n\nEven with throttling, applications might still receive responses with the status code\n`OVER_QUERY_LIMIT`. Configure your application to insert a small delay (20 ms)\nand try again if it receives such response."]]