基于微服务架构的多租户应用框架设计与实现
投稿时间:2025-11-14  修订日期:2025-12-25  点此下载全文
引用本文:
摘要点击次数: 16
全文下载次数: 0
作者单位邮编
王永靖 山东建筑大学 250101
徐遵义* 山东建筑大学 250101
马硕 山东建筑大学计算机与人工智能学院 
唐守伟 济南奔腾时代电力科技有限公司 
基金项目:山东省重大科技创新工程项目(2021CXGC011204);山东省重点研发计划(科技型中小企业创新能力提升工程)项目(2024TSGC0106);
中文摘要:为应对微服务多租户应用中租户数据源快速切换、跨服务配置一致性及租户标识全链路传递的挑战,本文提出一种云原生环境下的框架。该框架集成动态数据源管理、事件驱动配置同步与全链路租户标识传递机制,实现毫秒级数据源切换、低延迟配置更新与开发简化。在100租户并发场景下的实验表明,其平均数据源切换时间为7.2ms,较MyCat方案(15.9ms)提升约54.7%,较Hibernate方案(99.5ms)提升约14倍,吞吐量亦具优势。框架在声明式集成、动态响应与全栈隔离方面具有创新性,为相关开发提供标准化解决方案。
中文关键词:多租户应用  微服务架构  租户隔离  动态数据源管理  事件总线
 
Design and Implementation of Multi-tenant Application Framework Based on Microservices Architecture
Abstract:To address the challenges of rapid tenant data source switching, consistent cross-service configuration updates, and end-to-end tenant identification propagation in microservices-based multi-tenant applications, this paper proposes a framework in a cloud-native environment. The framework integrates dynamic data source management, event-driven configuration synchronization, and a full-link tenant identification transmission mechanism, achieving millisecond-level data source switching, low-latency configuration updates, and simplified development. Experiments under 100-tenant concurrency show an average data source switching time of 7.2ms, outperforming the MyCat solution (15.9ms) by about 54.7% and the Hibernate solution (99.5ms) by approximately 14 times, with notable throughput advantages. Its innovations in declarative integration, dynamic response, and full-stack isolation provide a standardized solution for such development.
keywords:multi-tenant application  microservice architecture  tenant isolation  dynamic data source management  event bus  
查看全文   查看/发表评论   下载pdf阅读器