マネージド接続プーリングを使用すると、プーリングを使用して Cloud SQL for MySQL インスタンスのリソース使用量と接続レイテンシを最適化し、ワークロードをスケーリングできます。マネージド接続プーリングは、受信リクエストを処理するスレッドのプールを作成します。これにより、スレッド数の増加によってサーバーが過負荷になることなく、接続の急増への耐性が得られるため、特にスケールされた接続でパフォーマンスが大幅に向上します。
[[["わかりやすい","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-08-08 UTC。"],[],[],null,["# Managed Connection Pooling overview\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/sql/docs/postgres/managed-connection-pooling \"View this page for the PostgreSQL database engine\") \\| SQL Server\n\n\u003cbr /\u003e\n\n|\n| **Preview\n| --- [Managed Connection Pooling](/sql/docs/mysql/managed-connection-pooling)**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| You can process personal data for this feature as outlined in the\n| [Cloud Data Processing\n| Addendum](/terms/data-processing-addendum), subject to the obligations and restrictions described in the agreement under\n| which you access Google Cloud.\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page describes what Managed Connection Pooling is and how to use it with your\nCloud SQL instances.\n\nManaged Connection Pooling lets you scale your workloads by optimizing resource utilization\nand connection latency for your Cloud SQL for MySQL instances using pooling.\nManaged Connection Pooling creates a pool of threads to handle\nincoming requests. This delivers significant performance improvements,\nespecially for scaled connections, by absorbing sudden connection spikes without\noverloading the server with a growth in the number of threads.\n\n\nWhile you can use Managed Connection Pooling for any transactional workloads,\nManaged Connection Pooling provides the most throughput and latency benefit with applications\nthat contain short-lived connections, or applications that result in a\nconnection surge.\n\nFor long-lived connections, the connection performance using\nManaged Connection Pooling can be slightly lower than when using a direct\nconnection. In this case, Managed Connection Pooling provides connection\nscaling when the number of connections is very high. However, for\napplications that typically establish long-lived connections, you might use\ndirect connections to your instance instead.\n\nFor more information on how to enable Managed Connection Pooling, see\n[Configure Managed Connection Pooling](/sql/docs/mysql/configure-mcp).\n\nRequirements\n------------\n\nTo use Managed Connection Pooling, your instance must meet the following requirements:\n\n- Your instance must be a Cloud SQL Enterprise Plus edition instance.\n- Managed Connection Pooling requires a minimum maintenance version number of `MYSQL_$version.R20250304.00_01`. For more information, see [Perform self-service maintenance](/sql/docs/mysql/self-service-maintenance).\n\nPorts used by Managed Connection Pooling for Cloud SQL instances\n----------------------------------------------------------------\n\nWhen you enable Managed Connection Pooling, the ports used by Cloud SQL instances to serve database traffic change. Managed Connection Pooling changes how MySQL handles connections, but the port numbers remain the same. The ports used by Managed Connection Pooling are as follows:\n\n- **TCP port 3306** : used for direct connections by the MySQL database server. This is the default port number used when [directly connecting using mysql client](/sql/docs/mysql/connect-admin-ip#connect).\n- **TCP port 3307**: used for the Cloud SQL Auth Proxy only connections by the Managed Connection Pooling server. When you use Cloud SQL Auth Proxy to connect to Managed Connection Pooling server, this port number is configured with the Cloud SQL Auth Proxy client and can't be changed.\n\nAvailable configuration options\n-------------------------------\n\nYou can [customize Managed Connection Pooling](/sql/docs/mysql/configure-mcp#modify-mcp) by using the following configuration parameters:\n\n\u003cbr /\u003e\n\n- `max_pool_size`: the amount of concurrency for MCP. The default value is number of cores in your database.\n\nLimitations\n-----------\n\nConsider the following limitations when using Managed Connection Pooling with\nyour Cloud SQL Enterprise Plus edition instances:\n\n- Enabling Managed Connection Pooling on an existing instance results in a database restart.\n- When you use the Cloud SQL API to enable, disable, or configure Managed Connection Pooling, the `instance.update` API can't contain any other instance configuration updates.\n\nWhat's next\n-----------\n\n- [Create an instance](/sql/docs/mysql/create-instance)\n- [Configure Managed Connection Pooling](/sql/docs/mysql/configure-mcp)"]]