了解如何缩放 Spring Boot 微服务

已完成

在 Azure Spring Apps 中运行的 Spring Boot 微服务和网关可以垂直或水平缩放:

  • 垂直缩放意味着增加(或减少)给定服务的 CPU 和 RAM。
  • 水平缩放意味着可以为给定服务添加(或删除)节点。

缩放“todo-service”微服务

  1. 转到 Azure 门户
  2. 转到 Azure Spring Apps 群集的概述页,然后在菜单中选择“应用”。
  3. 选择“todo-service”应用程序。
  4. 在左侧菜单中选择“纵向扩展”。 现在,你可以纵向扩展服务,例如,可为其提供 2 个 CPU 和 4 GB RAMScreenshot of the dialog box to scale your application.
  5. 在左侧菜单中选择“横向扩展”。 你还可以横向扩展服务。 例如,可以选择服务并使用“手动缩放”来获得 2 个服务实例