此蓝图包含一个名为“Cymbal Bank”的示例应用。Cymbal Bank 展示了建议用于容器化应用的最佳实践。借助 Cymbal Bank 应用,用户可以创建登录账号、登录其账号、查看交易历史记录、进行存款以及将资金转移到其他用户的账号。Cymbal Bank 服务作为通过 REST API 和 gRPC API 相互连接的容器运行。
Cymbal Bank 数据库使用 AlloyDB for PostgreSQL 进行部署。数据库在一个区域配置了高可用性主实例,在其他可用区配置了冗余节点,并且使用跨区域副本进行灾难恢复。Cymbal Bank 使用 IAM 数据库身份验证来允许服务访问数据库。数据库使用 CMEK 进行加密。两个 PostgreSQL 数据库已经得到使用:ledger-db 用于分类账,accounts-db 用于用户账号。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-12-13。"],[],[],null,["# Cymbal Bank application architecture\n\nThe blueprint includes a sample application that is named *Cymbal Bank* . Cymbal\nBank demonstrates the best practices that are recommended for containerized\napplications. The Cymbal Bank application lets users create login accounts, sign\nin to their account, see their transaction history, make deposits, and transfer\nmoney to other users' accounts. Cymbal Bank services run as containers that\nconnect to each other over [REST APIs](https://en.wikipedia.org/wiki/Representational_state_transfer) and [gRPC APIs](https://grpc.io/).\n\nThe following diagram shows the Cymbal Bank application that is deployed on the\nblueprint developer platform.\n\nEach application is also a network service. Only the frontend application is\nexposed externally to the cluster through the [GKE Gateway controller](/kubernetes-engine/docs/concepts/gateway-api).\nAll applications run as distributed services through the use of\n[Cloud Service Mesh](/anthos/service-mesh).\n\nFor more information about the services that are included in the Cymbal Bank\napplication, see the [Cymbal Bank repository on GitHub](https://github.com/GoogleCloudPlatform/terraform-google-enterprise-application/tree/main/examples/cymbal-bank).\n\nCymbal Bank tenants\n-------------------\n\nTo provide separation between tenants, each tenant in the developer platform has\none [team scope](/anthos/fleet-management/docs/team-management)\nand at least one fleet namespace.\nTenants never share a namespace. To deploy Cymbal Bank, each tenant only needs\none namespace. In more complex scenarios, a tenant can have several namespaces.\n\nTo illustrate how Cymbal Bank is deployed on the developer platform, this example assumes\nthat there were three separate application development teams with different\nfocus areas. The Terraform creates the following developer platform tenant for each of those\nteams:\n\n- **`frontend` tenant**: A development team that focuses on the website and mobile application backends.\n- **`accounts` tenant**: A development team that focuses on customer data.\n- **`ledger` tenant**: A team that manages the ledger services.\n\nCymbal Bank apps\n----------------\n\nThe Cymbal Bank application consists of six microservices: `frontend,\nledgerwriter, balancereader, transactionhistory, userservice`, and `contacts`.\nEach microservice is mapped to an application within the tenant that owns it.\n\nThe following table describes the mapping of the teams, team scope, fleet\nnamespace, and microservices for Cymbal Bank. For the purpose of this mapping,\nthis example assumes that Cymbal Bank is developed by three separate application operator\nteams. Teams manage a varying number of services. Each team is assigned a team\nscope.\n\nCymbal Bank database structure\n------------------------------\n\nCymbal Bank databases are deployed using\n[AlloyDB for PostgreSQL](/alloydb/docs/overview). The\ndatabases are configured with a [highly available primary instance](/alloydb/docs/overview#ha)\nin one [region](/docs/geography-and-regions#regions_and_zones) with\nredundant nodes in different zones, and [cross-region replicas](/alloydb/docs/cross-region-replication/about-cross-region-replication)\nare used for disaster recovery. Cymbal Bank uses [IAM database authentication](/alloydb/docs/manage-iam-authn#enable)\nto allow services access to the databases. The databases are encrypted using\n[CMEK](/sql/docs/postgres/configure-cmek). Two\nPostgreSQL databases are used: `ledger-db` for the ledger, and `accounts-db`\nfor user accounts.\n\nWhat's next\n-----------\n\n- Read about [mapping BeyondProd security principles to the blueprint](/architecture/enterprise-application-blueprint/mapping-beyondprod-security-principles) (next document in this series)."]]