En esta página, se describe qué es el agrupamiento de conexiones administrado y cómo usarlo para optimizar la administración de conexiones de bases de datos para tus instancias de Cloud SQL que usan el agrupamiento.
El agrupamiento de conexiones administrado te permite escalar tus cargas de trabajo optimizando el uso de recursos y la latencia de conexión para tus instancias de Cloud SQL con el agrupamiento.
La agrupación de conexiones administrada crea un grupo de subprocesos para controlar las solicitudes entrantes. Esto proporciona mejoras significativas en el rendimiento, en especial para las conexiones escaladas, ya que absorbe los picos repentinos de conexión sin sobrecargar el servidor con un aumento en la cantidad de subprocesos.
Para usar la agrupación de conexiones administrada, tu instancia debe cumplir con los siguientes requisitos:
Tu instancia debe ser de la edición Cloud SQL Enterprise Plus.
La agrupación de conexiones administrada requiere un número de versión de mantenimiento mínimo de MYSQL_$version.R20250531.01_10. Para obtener más información sobre cómo realizar el mantenimiento de autoservicio, consulta Cómo realizar el mantenimiento de autoservicio.
La opción max_pool_size controla la cantidad de simultaneidad para la agrupación de conexiones administrada.
El valor predeterminado depende de la cantidad de núcleos de CPU virtuales en la configuración de la máquina de tu instancia.
Limitaciones
Cuando uses la agrupación de conexiones administradas con tus instancias de la edición de Cloud SQL Enterprise Plus, ten en cuenta estas limitaciones:
Habilitar el grupo de conexiones administrado en una instancia existente provoca el reinicio de la base de datos.
Cuando el grupo de conexiones administrado está habilitado para tu instancia, el valor de la métrica thread_cache_size se establece de forma predeterminada en 0.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (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)"]]