Abstract
Multi-tenancy enables cost-effective SaaS through resource consolidation. Multiple customers, or tenants, are served by a single application instance, and isolation is enforced at the application level. Service load for different tenants can vary over time, requiring applications to scale in and out. A large class of SaaS providers operates legacy applications structured around a relational (SQL) database. These applications achieve tenant isolation through dedicated fields in their relational schema and are not designed to support scaling operations. We present a novel solution for scaling in or out such applications through the migration of a tenant’s data to new application and database instances. Our solution requires no change to the application and incurs no service downtime for non-migrated tenants. It leverages external tables and foreign data wrappers, as supported by major relational databases. We evaluate the approach using two multi-tenant applications: Iomad, an extension of the Moodle Learning Management System, and Camunda, a business process management platform. Our results show the usability of the method, minimally impacting performance for other tenants during migration and leading to increased service capacity after migration.
Keywords
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Database sharding, e.g., using PL/Proxy [22] allows splitting the content of tables over multiple database nodes, but it is not elastic: changing the sharding plan requires to restart the database. Database specific extensions such as the Citus extension for Postgresql or Vitess for Mysql permit automatic scaling. However, they imply switching to specific engines, with their limitations and limited support.
- 2.
Foreign Data Wrappers availability is vendor-dependent. Postgres, MySQL, and MariaDB support the ISO standard. Db2, SQL Server and Oracle do not support it, but offer similar features (with respectively distributed databases, linked servers, and database link). Support of distributed transactions is also vendor-dependent: they are not supported in MySQL, are only partially supported in PostgreSQL and the Open Source engine FederatedX of MariaDB, and fully supported in commercial engines such as Oracle, SQL Server, DB2, and the Spider engine of MariaDB.
- 3.
This inconvenience can be addressed by using database triggers emulating the integrity constraints.
- 4.
References
Barker, S., Chi, Y., Moon, H.J., Hacigümüş, H., Shenoy, P.: Cut me some slack: latency-aware live migration for databases. In: 15th International Conference on Extending Database Technology, EDBT. ACM (2012)
Chong, F., Carraro, G., Wolter, R.: Multi-tenant data architecture, pp. 14–30. MSDN Library, Microsoft Corporation (2006)
Das, S., Agrawal, D., El Abbadi, A.: ElasTraS: an elastic, scalable, and self-managing transactional database for the cloud. ACM Trans. Database Syst. 38(1), 1–45 (2013)
Data, C.: citus: Scalable PostgreSQL for multi-tenant and real-time analytics workloads (2020). https://github.com/citusdata/citus
Di Francesco, P., Lago, P., Malavolta, I.: Migrating towards microservice architectures: an industrial survey. In: International Conference on Software Architecture, ICSA. IEEE (2018)
Elmore, A.J., Arora, V., Taft, R., Pavlo, A., Agrawal, D., El Abbadi, A.: Squall: fine-grained live reconfiguration for partitioned main memory databases. In: ACM SIGMOD International Conference on Management of Data (2015)
Green, M.: Moodle Database schema (2020). https://www.examulator.com/er/
IDC: Worldwide Semiannual Public Cloud Services Tracker. https://www.idc.com/tracker/showproductinfo.jsp?prodid=881
Kalra, S., Prabhakar, T.: Multi-tenant quality attributes to manage tenants in SaaS applications. In: 2020 IEEE International Conference on Software Architecture Companion (ICSA-C), pp. 83–88. IEEE (2020)
Lin, Y.S., Pi, S.K., Liao, M.K., Tsai, C., Elmore, A., Wu, S.H.: MgCrab: transaction crabbing for live migration in deterministic database systems. Proc. VLDB Endow. 12(5), 597–610 (2019)
Melton, J., Michels, J.E., Josifovski, V., Kulkarni, K., Schwarz, P.: SQL/MED: a status report. SIGMOD Rec. 31(3), 81–89 (2002)
Michael, N., Shen, Y.: Downtime-free live migration in a multitenant database. In: Nambiar, R., Poess, M. (eds.) TPCTC 2014. LNCS, vol. 8904, pp. 130–155. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-15350-6_9
Microsoft: Scaling out - Azure SQL Database (2019). https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-scale-introduction
Moniruzzaman, A.B.M.: NewSQL: towards next-generation scalable RDBMS for online transaction processing (OLTP) for big data management. Int. J. Database Theory Appl. 7(6), 121–130 (2014)
Oracle: Database Live-Migration with Oracle Multitenant and the Oracle Universal Connection Pool (UCP) on Oracle Real Application Clusters (RAC) (2015). http://www.oracle.com/technetwork/database/multitenant/learn-more/pdblivemigration-2301324.pdf
Rosinosky, G., Labba, C., Ferme, V., Youcef, S., Charoy, F., Pautasso, C.: Evaluating multi-tenant live migrations effects on performance. In: Panetto, H., Debruyne, C., Proper, H.A., Ardagna, C.A., Roman, D., Meersman, R. (eds.) OTM 2018. LNCS, vol. 11229, pp. 61–77. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-02610-3_4
Rosinosky, G., Youcef, S., Charoy, F.: A genetic algorithm for cost-aware business processes execution in the cloud. In: Pahl, C., Vukovic, M., Yin, J., Yu, Q. (eds.) ICSOC 2018. LNCS, vol. 11236, pp. 198–212. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-03596-9_13
Schaffner, J., Jacobs, D., Kraska, T., Plattner, H.: The multi-tenant data placement problem. In: 4th International Conference on Advances in Databases, Knowledge, and Data Applications, DBKDA (2012)
Shah, A., Banakar, V., Shastri, S., Wasserman, M., Chidambaram, V.: Analyzing the impact of GDPR on storage systems. In: 11th USENIX Workshop on Hot Topics in Storage and File Systems. HotStorage (2019)
Shopify: ghostferry: The swiss army knife of live data migrations (2018). https://github.com/Shopify/ghostferry
Shute, J., et al.: F1: a distributed SQL database that scales. Proc. VLDB Endow. 6(11) (2013)
Suursoho, S., Kreen, M.: PL/Proxy: Function-based sharding for PostgreSQL. https://plproxy.github.io
Taft, R., Lang, W., Duggan, J., Elmore, A.J., Stonebraker, M., DeWitt, D.: STeP: scalable tenant placement for managing database-as-a-service deployments. In: 7th ACM Symposium on Cloud Computing, SoCC (2016)
Taft, R., et al.: CockroachDB: the resilient geo-distributed SQL database. In: ACM SIGMOD International Conference on Management of Data (2020)
Tumblr: jetpants: MySQL toolkit for managing billions of rows and hundreds of database machines (2020). https://github.com/tumblr/jetpants
Vitess: A database clustering system for horizontal scaling of MySQL (2020). https://vitess.io/
Wang, F., Li, J., Zhang, J., Huang, Q.: Research on the multi-tenant placement genetic algorithm based on eucalyptus platform. In: 12th International Conference on Computational Intelligence and Security, CIS. IEEE (2016)
Wang, Z.H., Guo, C.J., Gao, B., Sun, W., Zhang, Z., An, W.H.: A study and performance evaluation of the multi-tenant data tier design patterns for service oriented computing. In: International Conference on e-Business Engineering. IEEE (2008)
Weissman, C.D., Bobrowski, S.: The design of the force.com multitenant internet application development platform. In: ACM SIGMOD International Conference on Management of Data (2009)
Yu, X., Gadepally, V., Zdonik, S., Kraska, T., Stonebraker, M.: FastDAWG: improving data migration in the BigDAWG polystore system. In: Gadepally, V., Mattson, T., Stonebraker, M., Wang, F., Luo, G., Teodoro, G. (eds.) DMAH/Poly -2018. LNCS, vol. 11470, pp. 3–15. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-14177-6_1
Acknowledgments
This work was partially funded by the Belgian FNRS project DAPOCA (33694591).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 IFIP International Federation for Information Processing
About this paper
Cite this paper
Rosinosky, G., Youcef, S., Charoy, F., Rivière, E. (2021). A Methodology for Tenant Migration in Legacy Shared-Table Multi-tenant Applications. In: Matos, M., Greve, F. (eds) Distributed Applications and Interoperable Systems. DAIS 2021. Lecture Notes in Computer Science(), vol 12718. Springer, Cham. https://doi.org/10.1007/978-3-030-78198-9_1
Download citation
DOI: https://doi.org/10.1007/978-3-030-78198-9_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-78197-2
Online ISBN: 978-3-030-78198-9
eBook Packages: Computer ScienceComputer Science (R0)