使用 Ultralytics 在 Vertex AI 上部署预训练的 YOLO 模型以进行推理

本指南将向你展示如何使用 Ultralytics 将预训练的 YOLO26 模型容器化,为其构建 FastAPI 推理服务器,并利用推理服务器将模型部署到 Google Cloud Vertex AI 上。本示例实施涵盖了 YOLO26 的目标检测用例,但同样的原理也适用于使用 其他 YOLO 模式

在开始之前,你需要创建一个 Google Cloud Platform (GCP) 项目。作为新用户,你可以免费获得 300 美元的 GCP 额度,这足以测试一个可运行的设置,之后你还可以将其扩展到任何其他 YOLO26 用例,包括训练,或批量和流式推理。

你将学到什么

  1. 使用 FastAPI 为 Ultralytics YOLO26 模型创建推理后端。
  2. 创建一个 GCP Artifact Registry 仓库以存储你的 Docker 镜像。
  3. 构建包含模型的 Docker 镜像并将其推送到 Artifact Registry。
  4. 在 Vertex AI 中导入你的模型。
  5. 创建一个 Vertex AI 端点并部署模型。
为什么要部署容器化模型?
  • 利用 Ultralytics 实现完全模型控制:你可以使用自定义推理逻辑,完全掌控预处理、后处理和响应格式。
  • Vertex AI 处理其余部分:它能够自动扩缩容,同时在配置计算资源、内存和 GPU 设置方面提供了灵活性。
  • 原生 GCP 集成与安全性:与 Cloud Storage、BigQuery、Cloud Functions、VPC 控制、IAM 策略和审计日志无缝集成。

先决条件

  1. 在你的机器上安装 Docker
  2. 安装 Google Cloud SDK进行 gcloud CLI 身份验证
  3. 强烈建议你仔细阅读 Ultralytics Docker 快速入门指南,因为在遵循本指南时,你需要扩展其中一个官方 Ultralytics Docker 镜像。

使用 FastAPI 创建推理后端

首先,你需要创建一个 FastAPI 应用程序来为 YOLO26 模型推理请求提供服务。此应用程序将处理模型加载、图像预处理和推理(预测)逻辑。

Vertex AI 合规性基础

Vertex AI 要求你的容器实现两个特定的端点:

  1. 健康状况 (Health) 端点 (/health):当服务准备就绪时,必须返回 HTTP 状态 200 OK

  2. 预测 (Predict) 端点 (/predict):接受带有 base64 编码 图像和可选参数的结构化预测请求。有效载荷大小限制 适用于不同的端点类型。

    发送到 /predict 端点的请求有效载荷应遵循此 JSON 结构:

    {
        "instances": [{ "image": "base64_encoded_image" }],
        "parameters": { "confidence": 0.5 }
    }

项目文件夹结构

我们的大部分构建工作将在 Docker 容器内完成,而且 Ultralytics 也会加载预训练的 YOLO26 模型,因此你可以保持本地文件夹结构简单:

YOUR_PROJECT/
├── src/
│   ├── __init__.py
│   ├── app.py              # Core YOLO26 inference logic
│   └── main.py             # FastAPI inference server
├── tests/
├── .env                    # Environment variables for local development
├── Dockerfile              # Container configuration
├── LICENSE                 # AGPL-3.0 License
└── pyproject.toml          # Python dependencies and project config
重要的许可说明

Ultralytics YOLO26 模型和框架均在 AGPL-3.0 许可下发布,这有重要的合规要求。请确保阅读 Ultralytics 文档以了解 如何遵守许可条款

创建带有依赖项的 pyproject.toml

为了方便管理你的项目,请创建一个包含以下依赖项的 pyproject.toml 文件:

[project]
name = "YOUR_PROJECT_NAME"
version = "0.0.1"
description = "YOUR_PROJECT_DESCRIPTION"
requires-python = ">=3.10,<3.13"
dependencies = [
   "ultralytics>=8.3.0",
   "fastapi[all]>=0.89.1",
   "uvicorn[standard]>=0.20.0",
   "pillow>=9.0.0",
]

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
  • uvicorn 将用于运行 FastAPI 服务器。
  • pillow 将用于图像处理,但你不仅限于 PIL 图像 —— Ultralytics 支持 许多其他格式

使用 Ultralytics YOLO26 创建推理逻辑

现在你已经设置好了项目结构和依赖项,可以实现核心的 YOLO26 推理逻辑了。创建一个 src/app.py 文件,该文件将使用 Ultralytics Python API 处理模型加载、图像处理和预测。

# src/app.py

from ultralytics import YOLO

# Model initialization and readiness state
model_yolo = None
_model_ready = False

def _initialize_model():
    """Initialize the YOLO model."""
    global model_yolo, _model_ready

    try:
        # Use pretrained YOLO26n model from Ultralytics base image
        model_yolo = YOLO("yolo26n.pt")
        _model_ready = True

    except Exception as e:
        print(f"Error initializing YOLO model: {e}")
        _model_ready = False
        model_yolo = None

# Initialize model on module import
_initialize_model()

def is_model_ready() -> bool:
    """Check if the model is ready for inference."""
    return _model_ready and model_yolo is not None

这将在容器启动时加载一次模型,并且该模型将在所有请求之间共享。如果你的模型将处理繁重的推理负载,建议在稍后的 Vertex AI 模型导入步骤中选择内存更大的机器类型。

接下来,创建两个用于 pillow 输入和输出图像处理的实用函数。YOLO26 原生支持 PIL 图像。

def get_image_from_bytes(binary_image: bytes) -> Image.Image:
    """Convert image from bytes to PIL RGB format."""
    input_image = Image.open(io.BytesIO(binary_image)).convert("RGB")
    return input_image
def get_bytes_from_image(image: Image.Image) -> bytes:
    """Convert PIL image to bytes."""
    return_image = io.BytesIO()
    image.save(return_image, format="JPEG", quality=85)
    return_image.seek(0)
    return return_image.getvalue()

最后,实现 run_inference 函数来处理目标检测。在此示例中,我们将从模型预测中提取边界框、类别名称和置信度分数。该函数将返回一个包含检测结果和原始结果的字典,以便进行进一步处理或标注。

def run_inference(input_image: Image.Image, confidence_threshold: float = 0.5) -> Dict[str, Any]:
    """Run inference on an image using YOLO26n model."""
    global model_yolo

    # Check if model is ready
    if not is_model_ready():
        print("Model not ready for inference")
        return {"detections": [], "results": None}

    try:
        # Make predictions and get raw results
        results = model_yolo.predict(
            imgsz=640, source=input_image, conf=confidence_threshold, save=False, augment=False, verbose=False
        )

        # Extract detections (bounding boxes, class names, and confidences)
        detections = []
        if results and len(results) > 0:
            result = results[0]
            if result.boxes is not None and len(result.boxes.xyxy) > 0:
                boxes = result.boxes

                # Convert tensors to numpy for processing
                xyxy = boxes.xyxy.cpu().numpy()
                conf = boxes.conf.cpu().numpy()
                cls = boxes.cls.cpu().numpy().astype(int)

                # Create detection dictionaries
                for i in range(len(xyxy)):
                    detection = {
                        "xmin": float(xyxy[i][0]),
                        "ymin": float(xyxy[i][1]),
                        "xmax": float(xyxy[i][2]),
                        "ymax": float(xyxy[i][3]),
                        "confidence": float(conf[i]),
                        "class": int(cls[i]),
                        "name": model_yolo.names.get(int(cls[i]), f"class_{int(cls[i])}"),
                    }
                    detections.append(detection)

        return {
            "detections": detections,
            "results": results,  # Keep raw results for annotation
        }
    except Exception as e:
        # If there's an error, return empty structure
        print(f"Error in YOLO detection: {e}")
        return {"detections": [], "results": None}

(可选)你可以添加一个函数,使用 Ultralytics 内置的绘图方法用边界框和标签来标注图像。如果你希望在预测响应中返回标注后的图像,这将非常有用。

def get_annotated_image(results: list) -> Image.Image:
    """Get annotated image using Ultralytics built-in plot method."""
    if not results or len(results) == 0:
        raise ValueError("No results provided for annotation")

    result = results[0]
    # Use Ultralytics built-in plot method with PIL output
    return result.plot(pil=True)

使用 FastAPI 创建 HTTP 推理服务器

现在你有了核心的 YOLO26 推理逻辑,可以创建一个 FastAPI 应用程序来提供服务。这将包括 Vertex AI 所需的健康检查和预测端点。

首先,添加导入项并为 Vertex AI 配置日志记录。因为 Vertex AI 将 stderr 视为错误输出,所以将日志通过管道传输到 stdout 是合理的。

import sys

from loguru import logger

# Configure logger
logger.remove()
logger.add(
    sys.stdout,
    colorize=True,
    format="<green>{time:HH:mm:ss}</green> | <level>{message}</level>",
    level=10,
)
logger.add("log.log", rotation="1 MB", level="DEBUG", compression="zip")

为了完全符合 Vertex AI 合规性,请在环境变量中定义所需的端点并设置请求大小限制。建议生产环境部署使用 私有 Vertex AI 端点。这样你将拥有更高的请求载荷限制(10 MB 而非公共端点的 1.5 MB),同时具备更稳健的安全性与访问控制。

# Vertex AI environment variables
AIP_HTTP_PORT = int(os.getenv("AIP_HTTP_PORT", "8080"))
AIP_HEALTH_ROUTE = os.getenv("AIP_HEALTH_ROUTE", "/health")
AIP_PREDICT_ROUTE = os.getenv("AIP_PREDICT_ROUTE", "/predict")

# Request size limit (10 MB for private endpoints, 1.5 MB for public)
MAX_REQUEST_SIZE = 10 * 1024 * 1024  # 10 MB in bytes

添加两个用于验证请求和响应的 Pydantic 模型:

# Pydantic models for request/response
class PredictionRequest(BaseModel):
    instances: list
    parameters: Optional[Dict[str, Any]] = None

class PredictionResponse(BaseModel):
    predictions: list

添加健康检查端点以验证你的模型是否就绪。这对于 Vertex AI 非常重要,因为如果没有专用的健康检查,它的编排器会尝试 ping 随机套接字,并将无法确定模型是否准备好进行推理。你的检查在成功时必须返回 200 OK,在失败时返回 503 Service Unavailable

# Health check endpoint
@app.get(AIP_HEALTH_ROUTE, status_code=status.HTTP_200_OK)
def health_check():
    """Health check endpoint for Vertex AI."""
    if not is_model_ready():
        raise HTTPException(status_code=503, detail="Model not ready")
    return {"status": "healthy"}

你现在已经具备了实现处理推理请求的预测端点所需的一切。它将接收图像文件,运行推理并返回结果。请注意,图像必须进行 base64 编码,这会额外增加高达 33% 的载荷大小。

@app.post(AIP_PREDICT_ROUTE, response_model=PredictionResponse)
async def predict(request: PredictionRequest):
    """Prediction endpoint for Vertex AI."""
    try:
        predictions = []

        for instance in request.instances:
            if isinstance(instance, dict):
                if "image" in instance:
                    image_data = base64.b64decode(instance["image"])
                    input_image = get_image_from_bytes(image_data)
                else:
                    raise HTTPException(status_code=400, detail="Instance must contain 'image' field")
            else:
                raise HTTPException(status_code=400, detail="Invalid instance format")

            # Extract YOLO26 parameters if provided
            parameters = request.parameters or {}
            confidence_threshold = parameters.get("confidence", 0.5)
            return_annotated_image = parameters.get("return_annotated_image", False)

            # Run inference with YOLO26n model
            result = run_inference(input_image, confidence_threshold=confidence_threshold)
            detections_list = result["detections"]

            # Format predictions for Vertex AI
            detections = []
            for detection in detections_list:
                formatted_detection = {
                    "class": detection["name"],
                    "confidence": detection["confidence"],
                    "bbox": {
                        "xmin": detection["xmin"],
                        "ymin": detection["ymin"],
                        "xmax": detection["xmax"],
                        "ymax": detection["ymax"],
                    },
                }
                detections.append(formatted_detection)

            # Build prediction response
            prediction = {"detections": detections, "detection_count": len(detections)}

            # Add annotated image if requested and detections exist
            if (
                return_annotated_image
                and result["results"]
                and result["results"][0].boxes is not None
                and len(result["results"][0].boxes) > 0
            ):
                import base64

                annotated_image = get_annotated_image(result["results"])
                img_bytes = get_bytes_from_image(annotated_image)
                prediction["annotated_image"] = base64.b64encode(img_bytes).decode("utf-8")

            predictions.append(prediction)

        logger.info(
            f"Processed {len(request.instances)} instances, found {sum(len(p['detections']) for p in predictions)} total detections"
        )

        return PredictionResponse(predictions=predictions)

    except HTTPException:
        # Re-raise HTTPException as-is (don't catch and convert to 500)
        raise
    except Exception as e:
        logger.error(f"Prediction error: {e}")
        raise HTTPException(status_code=500, detail=f"Prediction failed: {e}")

最后,添加应用程序入口点以运行 FastAPI 服务器。

if __name__ == "__main__":
    import uvicorn

    logger.info(f"Starting server on port {AIP_HTTP_PORT}")
    logger.info(f"Health check route: {AIP_HEALTH_ROUTE}")
    logger.info(f"Predict route: {AIP_PREDICT_ROUTE}")
    uvicorn.run(app, host="0.0.0.0", port=AIP_HTTP_PORT)

你现在拥有一个完整的 FastAPI 应用程序,可以服务 YOLO26 推理请求。你可以通过安装依赖项并运行服务器(例如使用 uv)在本地对其进行测试。

# Install dependencies
uv pip install -e .

# Run the FastAPI server directly
uv run src/main.py

要测试服务器,你可以使用 cURL 查询 /health/predict 端点。在 tests 文件夹中放入一个测试图像。然后,在你的终端中运行以下命令:

# Test health endpoint
curl http://localhost:8080/health

# Test predict endpoint with base64 encoded image
curl -X POST -H "Content-Type: application/json" -d "{\"instances\": [{\"image\": \"$(base64 -i tests/test_image.jpg)\"}]}" http://localhost:8080/predict

你应该会收到一个包含检测到对象的 JSON 响应。在第一次请求时,预计会有短暂的延迟,因为 Ultralytics 需要拉取并加载 YOLO26 模型。

使用你的应用程序扩展 Ultralytics Docker 镜像

Ultralytics 提供了多个 Docker 镜像,你可以将其用作应用程序镜像的基础。Docker 将安装 Ultralytics 和必要的 GPU 驱动程序。

要充分利用 Ultralytics YOLO 模型的功能,你应该选择针对 GPU 推理优化的 CUDA 镜像。但是,如果 CPU 推理足以满足你的任务需求,你也可以通过选择纯 CPU 镜像来节省计算资源:

  • Dockerfile:针对 YOLO26 单/多 GPU 训练和推理优化的 CUDA 镜像。
  • Dockerfile-cpu:针对 YOLO26 推理的纯 CPU 镜像。

为你的应用程序创建 Docker 镜像

在你的项目根目录下创建一个 Dockerfile,内容如下:

# Extends official Ultralytics Docker image for YOLO26
FROM ultralytics/ultralytics:latest

ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1

# Install FastAPI and dependencies
RUN uv pip install fastapi[all] uvicorn[standard] loguru

WORKDIR /app
COPY src/ ./src/
COPY pyproject.toml ./

# Install the application package
RUN uv pip install -e .

RUN mkdir -p /app/logs
ENV PYTHONPATH=/app/src

# Port for Vertex AI
EXPOSE 8080

# Start the inference server
ENTRYPOINT ["python", "src/main.py"]

在本示例中,使用了官方 Ultralytics Docker 镜像 ultralytics:latest 作为基础。它已经包含了 YOLO26 模型和所有必要的依赖项。服务器的入口点与我们用于在本地测试 FastAPI 应用程序的入口点相同。

构建并测试 Docker 镜像

现在你可以使用以下命令构建 Docker 镜像:

docker build --platform linux/amd64 -t IMAGE_NAME:IMAGE_VERSION .

IMAGE_NAMEIMAGE_VERSION 替换为你想要的值,例如 yolo26-fastapi:0.1。请注意,如果你要在 Vertex AI 上部署,必须针对 linux/amd64 架构构建镜像。如果你是在 Apple Silicon Mac 或任何其他非 x86 架构上构建镜像,则需要明确设置 --platform 参数。

镜像构建完成后,你可以在本地测试 Docker 镜像:

docker run --platform linux/amd64 -p 8080:8080 IMAGE_NAME:IMAGE_VERSION

你的 Docker 容器现在正在端口 8080 上运行 FastAPI 服务器,随时准备接收推理请求。你可以使用与之前相同的 cURL 命令来测试 /health/predict 端点:

# Test health endpoint
curl http://localhost:8080/health

# Test predict endpoint with base64 encoded image
curl -X POST -H "Content-Type: application/json" -d "{\"instances\": [{\"image\": \"$(base64 -i tests/test_image.jpg)\"}]}" http://localhost:8080/predict

将 Docker 镜像上传到 GCP Artifact Registry

要在 Vertex AI 中导入你的容器化模型,你需要将 Docker 镜像上传到 Google Cloud Artifact Registry。如果你还没有 Artifact Registry 仓库,则需要先创建一个。

在 Google Cloud Artifact Registry 中创建仓库

在 Google Cloud Console 中打开 Artifact Registry 页面。如果你是第一次使用 Artifact Registry,系统可能会提示你先启用 Artifact Registry API。

Google Cloud Artifact Registry repository creation

  1. 选择“创建仓库”。
  2. 输入你的仓库名称。选择所需的区域,并对其他选项使用默认设置,除非你需要特别更改它们。
注意

区域选择可能会影响机器的可用性以及非企业用户的某些计算限制。你可以在 Vertex AI 官方文档中找到更多信息:Vertex AI 配额和限制

  1. 仓库创建后,将你的 PROJECT_ID、位置(区域)和仓库名称保存到你的密钥库或 .env 文件中。稍后你将需要它们来标记并推送到 Artifact Registry。

将 Docker 身份验证到 Artifact Registry

将你的 Docker 客户端身份验证到你刚创建的 Artifact Registry 仓库。在你的终端中运行以下命令:

gcloud auth configure-docker YOUR_REGION-docker.pkg.dev

标记并推送你的镜像到 Artifact Registry

将 Docker 镜像标记并推送到 Google Artifact Registry。

为你的镜像使用唯一标签

建议在每次更新镜像时使用唯一标签。大多数 GCP 服务(包括 Vertex AI)都依赖镜像标签进行自动版本控制和扩缩容,因此使用语义化版本号或基于日期的标签是一种好的做法。

使用 Artifact Registry 仓库 URL 标记你的镜像。将占位符替换为你之前保存的值。

docker tag IMAGE_NAME:IMAGE_VERSION YOUR_REGION-docker.pkg.dev/YOUR_PROJECT_ID/YOUR_REPOSITORY_NAME/IMAGE_NAME:IMAGE_VERSION

将标记后的镜像推送到 Artifact Registry 仓库。

docker push YOUR_REGION-docker.pkg.dev/YOUR_PROJECT_ID/YOUR_REPOSITORY_NAME/IMAGE_NAME:IMAGE_VERSION

等待过程完成。现在你应该能在你的 Artifact Registry 仓库中看到该镜像了。

有关如何使用 Artifact Registry 镜像的更具体说明,请参阅 Artifact Registry 文档:推送和拉取镜像

在 Vertex AI 中导入你的模型

使用你刚刚推送的 Docker 镜像,现在可以在 Vertex AI 中导入模型。

  1. 在 Google Cloud 导航菜单中,转到 Vertex AI > 模型注册表。或者,在 Google Cloud Console 顶部的搜索栏中搜索“Vertex AI”。

Vertex AI Model Registry import interface

1. Click Import. 1. Select Import as a new model. 1. Select the region. You can choose the same region as your Artifact Registry repository, but your selection should be dictated by the availability of machine types and quotas in your region. 1. Select Import an existing model container.

Vertex AI import model dialog

1. In the Container image field, browse the Artifact Registry repository you created earlier and select the image you just pushed. 1. Scroll down to the Environment variables section and enter the predict and health endpoints, and the port that you defined in your FastAPI application.

Vertex AI environment variables configuration

1. Click Import. Vertex AI will take several minutes to register the model and prepare it for deployment. You will receive an email notification once the import is complete.

创建一个 Vertex AI 端点并部署你的模型

Vertex AI 中的端点与模型

在 Vertex AI 术语中,端点是指已部署的模型,因为它们代表了你发送推理请求的 HTTP 端点,而模型是存储在模型注册表中的经过训练的 ML 工件。

要部署模型,你需要在 Vertex AI 中创建一个端点。

  1. 在你的 Vertex AI 导航菜单中,转到端点。选择你在导入模型时使用的区域。点击创建。

Vertex AI create endpoint interface

1. Enter the Endpoint name. 1. For Access, Vertex AI recommends using private Vertex AI endpoints. Apart from security benefits, you get a higher payload limit if you select a private endpoint, however you will need to configure your VPC network and firewall rules to allow access to the endpoint. Refer to the Vertex AI documentation for more instructions on [private endpoints](https://docs.cloud.google.com/vertex-ai/docs/predictions/choose-endpoint-type). 1. Click Continue. 1. On the Model settings dialog, select the model you imported earlier. Now you can configure the machine type, memory, and GPU settings for your model. Allow for ample memory if you are expecting high inference loads to ensure there are no I/O bottlenecks for the proper YOLO26 performance. 1. In Accelerator type, select the GPU type you want to use for inference. If you are not sure which GPU to select, you can start with NVIDIA T4, which is CUDA-supported.
区域和机器类型配额

请记住,某些区域的计算配额非常有限,因此你可能无法在你的区域中选择特定的机器类型或 GPU。如果这至关重要,请将部署区域更改为配额更大的区域。在 Vertex AI 官方文档中查找更多信息:Vertex AI 配额和限制

  1. 选择机器类型后,你可以点击继续。此时,你可以选择在 Vertex AI 中启用模型监控——这是一项跟踪模型性能并提供行为见解的额外服务。这是可选的且会产生额外费用,因此请根据你的需求进行选择。点击创建。

Vertex AI 部署模型需要几分钟(在某些区域可能长达 30 分钟)。部署完成后,你将收到一封电子邮件通知。

测试你已部署的模型

部署完成后,Vertex AI 将为你提供一个示例 API 接口来测试你的模型。

要测试远程推理,你可以使用提供的 cURL 命令或创建另一个将请求发送到已部署模型的 Python 客户端库。请记住,在发送到 /predict 端点之前,你需要将图像进行 base64 编码。

Vertex AI endpoint testing with cURL

预计第一次请求会有短暂延迟

与本地测试类似,预计第一次请求会有短暂延迟,因为 Ultralytics 需要在运行的容器中拉取并加载 YOLO26 模型。

你已成功使用 Ultralytics 在 Google Cloud Vertex AI 上部署了预训练的 YOLO26 模型。

常见问题 (FAQ)

我不使用 Docker 可以在 Vertex AI 上使用 Ultralytics YOLO 模型吗?

可以;但是,你需要先将模型导出为与 Vertex AI 兼容的格式,例如 TensorFlow、Scikit-learn 或 XGBoost。Google Cloud 提供了一个关于在 Vertex 上运行 .pt 模型的指南,其中完整概述了转换过程:在 Vertex AI 上运行 PyTorch 模型

请注意,所得的设置将仅依赖于 Vertex AI 标准服务层,并且不支持高级 Ultralytics 框架功能。由于 Vertex AI 完全支持容器化模型并能根据你的部署配置自动扩缩容,它允许你利用 Ultralytics YOLO 模型的全部功能,而无需将它们转换为其他格式。

为什么 FastAPI 是部署 YOLO26 推理的理想选择?

FastAPI 为推理工作负载提供了高吞吐量。其异步支持允许在不阻塞主线程的情况下处理多个并发请求,这对于部署计算机视觉模型至关重要。

FastAPI 的自动请求/响应验证功能减少了生产推理服务中的运行时错误。对于输入格式一致性要求极高的目标检测 API 而言,这一点尤为重要。

FastAPI 为你的推理流水线增加了极小的计算开销,从而能将更多资源留给模型执行和图像处理任务。

FastAPI 还支持 SSE (Server-Sent Events),这在流式推理场景中非常有用。

为什么我需要多次选择区域?

这实际上是 Google Cloud Platform 的一项通用功能,你需要为你使用的每项服务选择区域。对于在 Vertex AI 上部署容器化模型的任务,你最重要的区域选择是针对 Model Registry 的区域。它将决定你模型部署时机器类型和配额的可用性。

此外,如果你要扩展此设置并将预测数据或结果存储在 Cloud Storage 或 BigQuery 中,你需要使用与 Model Registry 相同的区域,以最小化延迟并确保数据访问的高吞吐量。

评论