Enabling multi tenancy(An Industrial Experience Report)Presentation Transcript
Enabling Multi-Tenancy An Industrial Experience Report Cor-Paul Bezemer, Andy Zaidman, Bart Platzbeecker, Toine Hurkmans, Aad ‘t Hart
Outline What is multi-tenancy? Converting single-tenant to multi-tenant applications CodenameMT Lessons learned
What is Multi-Tenancy? vs.
What is Multi-Tenancy? A multi-tenant application lets customers (tenants) share the same hardware resources, by offering them one shared application and database instance, while allowing them to configure the application to fit their needs as if it runs on a dedicated environment. vs.
Multi-Tenancy vs. Multi-User Tenant can span multiple users Tenants can have SLAs Tenants have more configurability options
Benefits of Multi-Tenancy Lower number of application and database instances Results in easier (& cheaper) deployment Requires high degree of configuration Higher utilization of hardware resources Results in lower hardware costs Lower deployment and hardware costs Results in the opportunity to offer a service at a lower price
Exact Codename and Multi-Tenancy Exact Codename: prototype of a Web 2.0 community Codename is currently single-tenant Why is multi-tenancy interesting for Codename? Allow rapid ‘deployment’ of different communities Install one instance, configure/maintain many Save on hardware resource costs
A Multi-Tenant Codename Version Goal: Create a multi-tenant version of Codename Requirements: Minor adjustments in existing code Let developers be (mostly) unaware of multi-tenancy Clearly separate multi-tenant components
CodenameMT: Authentication Add CodenameMT as a known party to the existing single sign-on server Add TenantID to token (claim and User objects) Note: ‘original’ Codename authentication still in place!
CodenameMT: Configuration Layout style Adapt global.asax to load tenant-specific masterpage/theme General configuration Stored in the database (handled by Data Access Layer) File I/O Load tenant-specific lists/entities Workflow - future work
CodenameMT: Database Add TenantID to tables that contain tenant-specific data
Not all tables contain such data, e.g. the Countries table
Add IsMultiTenant to data model Update Data Layer so that queries are aware of TenantID Add TenantID to indexes where necessary
Lessons Learned Lightweight reengineering approach Approx. 100 lines of code added to ~165K LOC Approx. 3 days of implementation were needed Layered architecture is important Fully transparent for the end-user End-user is unaware that the application is multi-tenant Little effect for the developer
Future Work Performance monitoring/prediction Prototype in ‘ideal’ multi-tenant architecture Apply ideas to Exact Online “Can we predict a peak in performance, and take appropriate scalability measures in time?”