Skip to main content

A Methodology for Tenant Migration in Legacy Shared-Table Multi-tenant Applications

  • Conference paper
  • First Online:
Distributed Applications and Interoperable Systems (DAIS 2021)

Part of the book series: Lecture Notes in Computer Science ((LNCCN,volume 12718))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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. 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. 3.

    This inconvenience can be addressed by using database triggers emulating the integrity constraints.

  4. 4.

    https://github.com/CloudLargeScale-UCLouvain/legacy-sql-migration.

References

  1. 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)

    Google Scholar 

  2. Chong, F., Carraro, G., Wolter, R.: Multi-tenant data architecture, pp. 14–30. MSDN Library, Microsoft Corporation (2006)

    Google Scholar 

  3. 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)

    Article  MathSciNet  Google Scholar 

  4. Data, C.: citus: Scalable PostgreSQL for multi-tenant and real-time analytics workloads (2020). https://github.com/citusdata/citus

  5. Di Francesco, P., Lago, P., Malavolta, I.: Migrating towards microservice architectures: an industrial survey. In: International Conference on Software Architecture, ICSA. IEEE (2018)

    Google Scholar 

  6. 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)

    Google Scholar 

  7. Green, M.: Moodle Database schema (2020). https://www.examulator.com/er/

  8. IDC: Worldwide Semiannual Public Cloud Services Tracker. https://www.idc.com/tracker/showproductinfo.jsp?prodid=881

  9. 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)

    Google Scholar 

  10. 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)

    Article  Google Scholar 

  11. Melton, J., Michels, J.E., Josifovski, V., Kulkarni, K., Schwarz, P.: SQL/MED: a status report. SIGMOD Rec. 31(3), 81–89 (2002)

    Article  Google Scholar 

  12. 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

    Chapter  Google Scholar 

  13. Microsoft: Scaling out - Azure SQL Database (2019). https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-scale-introduction

  14. 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)

    Article  Google Scholar 

  15. 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

  16. 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

    Chapter  Google Scholar 

  17. 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

    Chapter  Google Scholar 

  18. 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)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Shopify: ghostferry: The swiss army knife of live data migrations (2018). https://github.com/Shopify/ghostferry

  21. Shute, J., et al.: F1: a distributed SQL database that scales. Proc. VLDB Endow. 6(11) (2013)

    Google Scholar 

  22. Suursoho, S., Kreen, M.: PL/Proxy: Function-based sharding for PostgreSQL. https://plproxy.github.io

  23. 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)

    Google Scholar 

  24. Taft, R., et al.: CockroachDB: the resilient geo-distributed SQL database. In: ACM SIGMOD International Conference on Management of Data (2020)

    Google Scholar 

  25. Tumblr: jetpants: MySQL toolkit for managing billions of rows and hundreds of database machines (2020). https://github.com/tumblr/jetpants

  26. Vitess: A database clustering system for horizontal scaling of MySQL (2020). https://vitess.io/

  27. 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)

    Google Scholar 

  28. 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)

    Google Scholar 

  29. 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)

    Google Scholar 

  30. 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

    Chapter  Google Scholar 

Download references

Acknowledgments

This work was partially funded by the Belgian FNRS project DAPOCA (33694591).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Guillaume Rosinosky .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 IFIP International Federation for Information Processing

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics