您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

构建 Web 和移动应用程序

Cosmos DB
Database for MySQL
Databricks
Kubernetes 服务

解决方案构想 Solution Idea

若要查看有关详细信息、实现细节、定价指南或代码示例的信息,请向我们提供 GitHub 反馈If you'd like to see us expand this article with more information, implementation details, pricing guidance, or code examples, let us know with GitHub Feedback!

借助 Azure,可以轻松构建 web 和移动应用程序,以帮助进行数字支付、宾馆或租车预订、电子商务平台等。With Azure, it’s easy to build web and mobile applications to help with digital payments, hotel or rental car bookings, e-commerce platforms, and more. 基于微服务的体系结构使组织能够无缝地按需缩放以适应 internet 规模的用户。A microservices-based architecture enables organizations to seamlessly scale on demand to cater to internet-scale users.

体系结构Architecture

体系结构关系图

数据流Data Flow

此参考体系结构是汇丰银行的数字支付平台、PayMe for Business 的灵感。This reference architecture is inspired by HSBC’s digital payment platform, PayMe for Business. 每个微服务都是完全包含的,并连接到在 PaaS 实例上托管的自己的数据库。Each microservice is fully contained and connects to its own database hosted on a PaaS instance. 该体系结构利用针对每个微服务的专门构建的数据存储区的 polyglot 持久性。The architecture leverages polyglot persistence with a purpose-built data store for each microservice. 分析平台从不同的数据存储中提取数据,形成一个统一的数据平台,该平台可用于为分析报表提供服务,为最终用户提供历史报表,并为推荐引擎定型 ML 模型。The analytical platform pulls the data from the disparate data stores to form a unified data platform which can be used to serve analytical reports, historical reports for end users, and train the ML models for recommendation engine.

该体系结构利用了在 Azure Kubernetes Services (AKS) 上部署的基于 Java 的应用程序,以及在 Azure Database for MySQL 上承载的事务性数据库的微服务设计。The architecture leverages a microservices design with Java-based application pods deployed on Azure Kubernetes Services (AKS), and a transactional database hosted on Azure Database for MySQL. 使用读取副本的 Azure Database for MySQL 允许横向扩展设计,读取器应用程序微服务直接连接到读取副本以避免写入器/读取器争用。Azure Database for MySQL with read replicas allows for a scale-out design, with reader application microservices connecting directly to read replicas to avoid writer/reader contention. 适用于 Redis 的 Azure 缓存用作存储会话状态信息和作为键值存储的快速缓存层。Azure Cache for Redis serves as a fast caching layer storing session state information, and as a key-value store. 提供推荐引擎的图形数据存储在使用 Gremlin API Azure Cosmos DB 中。Graphical data serving the recommendation engine is stored in Azure Cosmos DB using the Gremlin API.

Azure Database for MySQL 读取副本中的数据与 Azure Cosmos DB 和实时事件一起使用 Azure Databricks 处理,并存储在分析平台中。The data from Azure Database for MySQL read replicas along with Azure Cosmos DB and real time events are processed using Azure Databricks and stored in the analytics platform. 分析平台用于通过 Power BI 提供商业智能报表、培训建议引擎机器学习 (ML) 模型,以及向通过微服务 API 公开的客户提供历史报告。The analytics platform is used to serve business intelligence reports via Power BI, train recommendation engine machine learning (ML) models, and serve historical reports back to the customers exposed through the microservices API.

组件Components

  • Azure Database for MySQL 是一项完全托管的关系数据库服务,它基于开源 MySQL 数据库引擎的社区版。Azure Database for MySQL is a fully managed relational database service based on the community edition of the open-source MySQL database engine.
  • Azure Cosmos DB 是一种完全托管的 NoSQL 数据库服务,用于构建和现代化可伸缩、高性能的应用程序。Azure Cosmos DB is a fully managed NoSQL database service for building and modernizing scalable, high performance applications.
  • 适用于 Redis 的 Azure 缓存 是一种安全的数据缓存和消息传送代理,可为应用程序的数据提供高吞吐量和低延迟的访问。Azure Cache for Redis is a secure data cache and messaging broker that provides high throughput and low-latency access to data for applications.
  • Azure Kubernetes 服务 是一种高度可用、安全和完全托管的 Kubernetes 服务,可让你轻松地部署和管理容器化应用程序。Azure Kubernetes Service is a highly available, secure, and fully managed Kubernetes service that makes it easy to deploy and manage containerized applications.
  • 事件中心 是一种完全托管的实时数据引入服务。Event Hubs is a fully managed, real-time data ingestion service. 从任何源流式处理数百万个事件,以生成动态数据管道。Stream millions of events per second from any source to build dynamic data pipelines.
  • Azure Databricks 是一种基于 Apache Spark 的分析服务,用于大数据分析和 AIAzure Databricks is an Apache Spark-based analytics service for big data analytics and AI
  • Power BI 是一套用于自助服务和企业商业智能 (BI) 的商业工具。Power BI is a suite of business tools for self-service and enterprise business intelligence (BI). 此处用于分析和可视化数据。Here, it’s used to analyze and visualize data.

后续步骤Next Steps

  • 了解 汇丰银行如何使用 Azure Database for MySQL 和 Azure Cosmos DB 构建其数字支付平台Learn how HSBC built their digital payment platform using Azure Database for MySQL and Azure Cosmos DB
  • 了解如何将 MySQL 工作负荷 从本地迁移到 AzureLearn how to migrate MySQL workloads from on-premises to Azure