Welcome!

Agile Computing Authors: Liz McMillan, Angsuman Dutta, Yeshim Deniz, Harry Trott, Mehdi Daoudi

Related Topics: Agile Computing, Containers Expo Blog, @CloudExpo

Agile Computing: Article

Architecting for Multi-Tenancy in the Cloud

Implementing a multi-tenant service

Why is Software as a service (SaaS) gaining such momentum? What makes the SaaS proposition so compelling? “Faster time to capability” and “lower upfront cost” are two of the main reasons for this. For any organization looking into adding a system capability, once the buy or build decision is out of the way and the decision is to buy, there are two choices; either buy a software package and deploy it on premise OR subscribe to a SaaS provider. Deploying a software package on premise is no simple task. It can take months or even years to go-live with full functionality and realize the ROI. In contrast, SaaS can provide full functionality in days to weeks.

The reason SaaS can provide such fast time to capability and low upfront costs is because of a shared service model where multiple customers share the same deployment of software. This is also known as multi-tenancy. Achieving multi-tenancy is not trivial and requires a lot of upfront thinking and architectural work. The complexity due to multi-tenancy can vary depending on the nature of the service. For example, in the case of an infrastructural service (such as email, instant messaging etc), all customers (tenants) would pretty much require the same set of functionality. In contrast, a business application service (such as salesforce automation) might have to support different business processes, policies and rules for different customers (tenants), which can make the service very complex and challenging to implement. Also, usually, implementing multi-tenancy in business to consumer (B2C) services is simpler than that in business to business (B2B) services, because B2C services are used directly by customers of the service whereas B2B services are used by end-users of customers, leading to an additional layer of complexity to manage. Further, implementing multi-tenancy for Platform as a Service (PaaS), what I like to call multi-tiered multi-tenancy such as the Force.com platform is even more complex. Here each tenant has multiple tenants in turn and each of these tenants might need their own extensions or modifications to the functionality!

So how is multi-tenancy achieved? A typical software application consists of an application tier and a database tier. Different strategies can be applied at application and database tier to support multi-tenancy.

The simplest approach to implementing multi-tenancy is to create completely separate instances of servers (application and database) for each tenant. With this approach, application code and database schema for each tenant are deployed on completely separate servers and there is no sharing across tenants except the common codebase and schema definition. Each tenant can potentially have its own extension of the code and database schema to support any difference in processes and functionality from other tenants, although it can get very costly to maintain tenant specific extensions. With this approach, even though codebase is shared across multiple tenants, the cost of deployment for each tenant can be pretty high which in turn will increase the cost of the service. One way to optimize the cost with this approach is to host multiple instances of application and database servers on the same hardware. This can be further optimized using server virtualization. This may be an acceptable approach if the number of tenants is expected to be very small.

A more optimal way of implementing a multi-tenant SaaS (or PaaS) solution is to deploy shared instances of servers across multiple tenants. This is where SaaS starts to pay off. With this approach, compute and storage resources are shared across multiple tenants resulting in lower cost of service for each tenant. Within this approach, multiple levels of sharing can be implemented to further reduce the cost of the service as follows:

  • Instance sharing: Instance sharing can be done, 1) only at the database server level or 2) both at application and database server level. Of course, more sharing means more savings which can be passed on to customers resulting in lower cost of service. But more sharing also means that more upfront thought has to go into architecture and design of the service since any problem with the shared instance will affect multiple tenants. This higher upfront investment can have a huge long-term payoff though by reducing the operational cost (and hence total cost of ownership) of the service.
  • Database schema sharing: If instance sharing is implemented at the database level, then within the same database server instance, 1) a separate database user schema can be deployed for each tenant or 2) all tenants can share a common database user schema. Common database schema is more cost effective but can be challenging to implement and optimize. Handling custom extensions for each tenant can make this even harder to implement. One way to deal with this is to drive functionality based on meta-data. Each tenant can inherit the common meta-data and define its own meta-data on top of that to support tenant specific extensions to processes and policies. This is how Salesforce.com is designed. Database partitioning strategies can be implemented for better performance. Data is usually partitioned based on customer ID (Tenant ID) to keep all the data for a given customer in the same partition for performance reasons. A certain number of predetermined tenants live in each partition. The extent to which tenant specific extensions need to be supported depends on the nature of the service as mentioned earlier (e.g. email vs sales force automation)
  • Application code sharing: If instance sharing is implemented at the application server level, then within the same application server instance, 1) separate code modules can be deployed for each tenant or 2) all tenants can share the same code module deployment (e.g. war file). Again, more sharing means more savings but the operational issues have to be kept in mind and lot of thought has to go into architecture and design of the shared application. All the rules should be externalized so that tenant specific extensions to processes and policies can be incorporated in the shared codebase. Application partitioning strategies can be implemented to improve performance and scalability of shared applications. Multiple partitions can be created to support large sets of tenants. Requests can be routed to the correct partition based on tenant ID and/or other predetermined criteria.

In conclusion, there are multiple ways to implement multi-tenancy and the choice depends on the nature of service being implemented. It is very important to spend the necessary time upfront during architecture phase to determine the multi-tenancy needs and to come up with the best design for supporting multi-tenancy, depending on the current needs and future vision of the service. Once the approach has been decided and implemented, it can be extremely difficult and costly to change, much like converting a fourplex into a multiplex apartment complex can be an almost impossible task without starting from scratch.

More Stories By Vinay Singla

Vinay Singla is a senior technology professional with extensive experience in the SaaS and SOA space.

@ThingsExpo Stories
"We're a cybersecurity firm that specializes in engineering security solutions both at the software and hardware level. Security cannot be an after-the-fact afterthought, which is what it's become," stated Richard Blech, Chief Executive Officer at Secure Channels, in this SYS-CON.tv interview at @ThingsExpo, held November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA.
Consumers increasingly expect their electronic "things" to be connected to smart phones, tablets and the Internet. When that thing happens to be a medical device, the risks and benefits of connectivity must be carefully weighed. Once the decision is made that connecting the device is beneficial, medical device manufacturers must design their products to maintain patient safety and prevent compromised personal health information in the face of cybersecurity threats. In his session at @ThingsExpo...
SYS-CON Events announced today that Grape Up will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct. 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Grape Up is a software company specializing in cloud native application development and professional services related to Cloud Foundry PaaS. With five expert teams that operate in various sectors of the market across the U.S. and Europe, Grape Up works with a variety of customers from emergi...
Detecting internal user threats in the Big Data eco-system is challenging and cumbersome. Many organizations monitor internal usage of the Big Data eco-system using a set of alerts. This is not a scalable process given the increase in the number of alerts with the accelerating growth in data volume and user base. Organizations are increasingly leveraging machine learning to monitor only those data elements that are sensitive and critical, autonomously establish monitoring policies, and to detect...
SYS-CON Events announced today that Massive Networks will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Massive Networks mission is simple. To help your business operate seamlessly with fast, reliable, and secure internet and network solutions. Improve your customer's experience with outstanding connections to your cloud.
Everything run by electricity will eventually be connected to the Internet. Get ahead of the Internet of Things revolution and join Akvelon expert and IoT industry leader, Sergey Grebnov, in his session at @ThingsExpo, for an educational dive into the world of managing your home, workplace and all the devices they contain with the power of machine-based AI and intelligent Bot services for a completely streamlined experience.
Because IoT devices are deployed in mission-critical environments more than ever before, it’s increasingly imperative they be truly smart. IoT sensors simply stockpiling data isn’t useful. IoT must be artificially and naturally intelligent in order to provide more value In his session at @ThingsExpo, John Crupi, Vice President and Engineering System Architect at Greenwave Systems, will discuss how IoT artificial intelligence (AI) can be carried out via edge analytics and machine learning techn...
SYS-CON Events announced today that Datera, that offers a radically new data management architecture, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Datera is transforming the traditional datacenter model through modern cloud simplicity. The technology industry is at another major inflection point. The rise of mobile, the Internet of Things, data storage and Big...
In the enterprise today, connected IoT devices are everywhere – both inside and outside corporate environments. The need to identify, manage, control and secure a quickly growing web of connections and outside devices is making the already challenging task of security even more important, and onerous. In his session at @ThingsExpo, Rich Boyer, CISO and Chief Architect for Security at NTT i3, discussed new ways of thinking and the approaches needed to address the emerging challenges of security i...
SYS-CON Events announced today that GrapeUp, the leading provider of rapid product development at the speed of business, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Grape Up is a software company, specialized in cloud native application development and professional services related to Cloud Foundry PaaS. With five expert teams that operate in various sectors of the market acr...
From 2013, NTT Communications has been providing cPaaS service, SkyWay. Its customer’s expectations for leveraging WebRTC technology are not only typical real-time communication use cases such as Web conference, remote education, but also IoT use cases such as remote camera monitoring, smart-glass, and robotic. Because of this, NTT Communications has numerous IoT business use-cases that its customers are developing on top of PaaS. WebRTC will lead IoT businesses to be more innovative and address...
SYS-CON Events announced today that CA Technologies has been named "Platinum Sponsor" of SYS-CON's 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CA Technologies helps customers succeed in a future where every business - from apparel to energy - is being rewritten by software. From planning to development to management to security, CA creates software that fuels transformation for companies in the applic...
In his opening keynote at 20th Cloud Expo, Michael Maximilien, Research Scientist, Architect, and Engineer at IBM, discussed the full potential of the cloud and social data requires artificial intelligence. By mixing Cloud Foundry and the rich set of Watson services, IBM's Bluemix is the best cloud operating system for enterprises today, providing rapid development and deployment of applications that can take advantage of the rich catalog of Watson services to help drive insights from the vast t...
Internet of @ThingsExpo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 21st Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal and enterprise IT since the creation of the Worldwide Web more than 20 years ago. All major researchers estimate there will be tens of billions devic...
Recently, IoT seems emerging as a solution vehicle for data analytics on real-world scenarios from setting a room temperature setting to predicting a component failure of an aircraft. Compared with developing an application or deploying a cloud service, is an IoT solution unique? If so, how? How does a typical IoT solution architecture consist? And what are the essential components and how are they relevant to each other? How does the security play out? What are the best practices in formulating...
In his session at @ThingsExpo, Arvind Radhakrishnen discussed how IoT offers new business models in banking and financial services organizations with the capability to revolutionize products, payments, channels, business processes and asset management built on strong architectural foundation. The following topics were covered: How IoT stands to impact various business parameters including customer experience, cost and risk management within BFS organizations.
SYS-CON Events announced today that Elastifile will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Elastifile Cloud File System (ECFS) is software-defined data infrastructure designed for seamless and efficient management of dynamic workloads across heterogeneous environments. Elastifile provides the architecture needed to optimize your hybrid cloud environment, by facilitating efficient...
SYS-CON Events announced today that Golden Gate University will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Since 1901, non-profit Golden Gate University (GGU) has been helping adults achieve their professional goals by providing high quality, practice-based undergraduate and graduate educational programs in law, taxation, business and related professions. Many of its courses are taug...
SYS-CON Events announced today that DXWorldExpo has been named “Global Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Digital Transformation is the key issue driving the global enterprise IT business. Digital Transformation is most prominent among Global 2000 enterprises and government institutions.
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics ...