Software as a Service目前已经是一个重要的市场热点,SAAS打破传统软件产业链的结构。他指出软件不再是面向单一客户的开发。而是将软件作为一种服务,提供给多个企业使用。Wikipedia这样定义SAAS:
Multitenancy refers to the architectural principle, where a single instance of the software runs on a software-as-a-service (SaaS) vendor's servers, serving multiple client organizations (tenants). Multitenancy is contrasted with a multi-instance architecture where separate software instances (or hardware systems) are set up for different client organizations. With a multitenant architecture, a software application is designed to virtually partition its data and configuration so that each client organization works with a customized virtual application instance.
从这个定义可以知道Multitenancy是SAAS中最重要的技术。最近这半年一直从事Multitenancy方面的研究。在这里把这半年的工作也做一下总结。
Multitenancy主要涉及到Isolation 、Scalability 、Availability、By tenant management 等几个方面。当然最重要的还是在massive multi-tenants 中如果保证让更多的tenant使用服务而不会影响系统地performance.
Isolation 是multi-tenants 最base的要求。他要求我们能在多个tenants之间(虽然tenants share同一个application ,share 同一个DB)保证一定隔离性。Tenants之间不会影响。这里的Isolation主要从两个方面来说。一个是security isolation , 另一个是performance isolation 。 security isolation 相信大家都可以理解。并且现在有很多技术可以保证这种isolation ,比如:DB2 LBAC、在业务数据项增加tenant信息隔离、separate table、sparate database 等等。当然每种技术都有各自的优缺点,这里就不再累诉了。
Performance isolation 是一个比较难以实现的。他要求了tenants 在服务器资源中是share everything 模式。但又可以保证在同一台服务器上的tenants可以在一定程度上保证之间的performance isolation,不会因为某个tenants的非正常的访问浪费系统大量的资源处理而让其他正常访问的tenants 不能得到很好的服务。在这里我提供两种solution:
1、在同一台服务器上的tenants所有的访问行为被控制。在达到系统瓶颈时不做处理。当达到系统资源瓶颈时通过调度算法。在tenants之间进行调度执行。
2、 对tenants实施SLA分级服务。不同SLA的tenants 运行在不同的服务器上。
Scalability 也是 multi-tenants系统中一个比较重要的要求。它要求系统有良好的可扩展性。以便于当tenants数量增加时能够很好的扩展性需求。在Massive multi-tenants场景下我们更应该提供一种low cost scalability 技术。传统的scalability 主要是通过应用服务器和数据库方面的cluster 技术来进行扩展的。这里我们提供一种Meta data driven 的方式。当tenants 请求时通过 dynamic routing 机制进行routing 到不同的服务器上。
Availability 要求系统能够提供很好的高可用性。整个系统不会应为某一个tenant的不稳定而导致其他的tenant受到影响。同时系统本身也提供高可靠性。我们可以使用db partition 技术来实现这种要求。
By Tenant Management 主要体现在 By tenant backup/restore , By tenant migration , By tenant customization , By tenant performance monitoring 等等几个方面。当让根据系统的特性。可以提供更多的By tenant operation . 这个环节主要是根据系统的具体设计可以来提供。
好了,这次的总结就到这里了。
posted on 2008-03-07 22:02
安文豪 阅读(1354)
评论(3) 编辑 收藏