비율 제한 방지 계획
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
최적의 시스템 안정성과 성능을 유지하기 위해 헬스 커넥트는 Health Connect API에 대한 클라이언트 연결에 비율 제한을 적용합니다.
이 가이드에서는 헬스 커넥트에서 읽기 및 쓰기 API 작업에 적용되는 비율 제한과 효율적인 앱 설계를 통해 비율 제한을 피하는 방법을 설명합니다.
API 제한
제한은 포그라운드 및 백그라운드 API 작업 모두에 고정된 요청 비율 할당량으로 적용됩니다.
비율 및 메모리 제한은 앱이 실행하는 작업 유형에 따라 다르고 이러한 작업이 포그라운드에서 실행되는지 또는 백그라운드에서 실행되는지에 따라서도 달라집니다.
읽기 및 변경 로그 제한
읽기 및 변경 로그 제한의 경우 헬스 커넥트는 앱에서 사용할 수 있는 API 호출 수에 두 가지 제한을 적용합니다.
- 앱에서 API에 실행할 수 있는 API 호출 수에 관한 주기적 제한
- 앱에서 호출할 수 있는 API 호출 수에 관한 일일 제한
제한 삽입, 업데이트, 삭제
헬스 커넥트는 삽입, 업데이트, 삭제 작업에 4가지 제한을 적용합니다.
- 앱에서 API에 실행할 수 있는 호출 수에 관한 주기적 제한
- 앱에서 API를 호출할 수 있는 호출 수에 관한 일일 제한
- 일괄 삽입에 적용되는 메모리 제한
- 단일 레코드 삽입에 적용되는 메모리 제한
권장사항
앱은 배터리 사용량을 최소화하고 최적의 시스템 상태를 유지하면서 모든 CRUD 작업에서 효율적인 데이터 관리를 장려하는 방식으로 Health Connect API와 상호작용하는 것이 좋습니다.
다음은 준수해야 할 권장사항 가이드라인입니다.
백그라운드 API 호출
백그라운드 작업의 배터리 사용량은 사용자 경험을 줄이고 데이터 개인 정보 보호에 관한 의심을 초래합니다.
따라서 백그라운드 비율 제한은 포그라운드 비율 제한보다 더 엄격합니다.
앱이 백그라운드에서 실행하는 API 호출 양을 제한하는 것이 중요합니다.
예외 처리
헬스 커넥트에 데이터를 쓸 때 앱에서 예외가 발생하면 예외가 발생한 위치에서 다시 시도하는 것이 좋습니다.
문제의 데이터를 모두 삭제하지 말고 전체 쓰기 요청을 다시 시도하지 마세요.
이 접근 방식은 삽입 할당량을 사용하고, 성능을 저하하며, 배터리 수명에 부정적인 영향을 미칩니다.
변경 로그 처리
앱에 비율 제한이 적용될 위험을 최소화하려면 원시 읽기 요청에 너무 의존하지 말고 변경 로그 처리를 활용하여 데이터베이스를 헬스 커넥트의 데이터와 동기화해야 합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Plan to avoid rate limiting\n\nTo maintain optimal system stability and performance, Health Connect imposes\nrate limits on client connections to the Health Connect API.\n\nThis guide outlines the limits imposed on read and write API operations in\nHealth Connect, and how to avoid rate limiting through efficient app design.\n\nAPI limits\n----------\n\nLimits are placed on both foreground and background API operations as **fixed\nrequest rate quotas**.\n\nRate and memory limits are variable based on the type of operation your app is\nperforming, and whether that operation occurs in the foreground or background.\n\n### Read and changelog limits\n\nFor read and changelog limits, Health Connect imposes two limits on the number\nof API calls available to your app:\n\n- A periodic limit on the number of API calls your app can make to the API.\n- A daily limit on the number of API calls your app can make.\n\n### Insert, update and delete limits\n\nHealth Connect places four distinct limits on insertion, update and deletion\noperations:\n\n- A periodic limit on the number of calls your app can make to the API.\n- A daily limit on the number of calls your app can make to the API.\n- A memory limit for bulk insertions.\n- A memory limit for single record insertions.\n\nBest practices\n--------------\n\nWe recommend that apps interact with the Health Connect API in a way that\nminimizes battery use, maintains optimal system health and promotes efficient\ndata management across all CRUD operations.\n\nHere are some best practice guidelines to adhere to.\n\n### Background API calls\n\nBattery usage for background operations reduces the user experience and raises\nquestions regarding [data privacy](/guide/health-and-fitness/health-connect/develop/read-data#foreground-restriction).\n\nAs such, background rate limiting is stricter than foreground rate limiting.\nIt's therefore important to limit the amount of API calls your app carries out\nin the background.\n\n### Exception handling\n\nIf your app experiences an exception when writing data to Health Connect, we\nrecommend retrying from where the exception occurred.\n\nDon't simply delete all the data in question and retry the entire write request.\nThis approach eats into your insert quota, reduces performance, and has a\nnegative impact on battery life.\n\n### Changelog handling\n\nTo minimize the risk of your app being rate limited, you should utilize\n[changelog handling](/guide/health-and-fitness/health-connect/develop/sync-data#pull-data) to synchronize your database with data from Health\nConnect, rather than over-relying on raw read requests."]]