ArticleslgStudy

computer science

Multitenancy

Multitenancy is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Multitenancy rather than just read about it. In short: Software multitenancy is a software architecture in which a single instance of software runs on a server and serves multiple tenants. Systems designed in such manner are "shared" (rather than "dedicated" or "isolated").

Key takeaways

  • Multitenancy belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Multitenancy to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Multitenancy from memory before moving on to harder problems.

Reference excerpt

Software multitenancy is a software architecture in which a single instance of software runs on a server and serves multiple tenants. Systems designed in such manner are "shared" (rather than "dedicated" or "isolated"). A tenant is a group of users who share a common access with specific privileges to the software instance. With a multitenant architecture, a software application is designed to provide every tenant a dedicated share of the instance—including its data, configuration, user management, tenant individual functionality and non-functional properties. Multitenancy contrasts with multi-instance architectures, where separate software instances operate on behalf of different tenants. Some commentators regard multitenancy as an important feature of cloud computing.

Adoption

History of multitenant applications Multitenant applications have evolved from—and combine some characteristics of—three types of services:

Timesharing: From the 1960s companies rented space and processing power on mainframe computers (time-sharing) to reduce computing expenses. Often they also reused existing applications, with simply a separate entry field on the logon screen to specify a customer-account ID. On the basis of this ID, the mainframe's accountants could charge the individual customers for CPU, memory and disk/tape usage actually incurred. Hosted applications: From the 1990s traditional application service providers (ASPs) hosted (then-existing) applications on behalf of their customers. Depending on the limitation of the underlying application, ASPs were forced to host applications on separate machines (if multiple instances of the applications could not be executed in the same physical machine) or as separate processes. Multitenant applications represent a more mature architecture which enables a similar service with lower operational cost. Web applications: Popular consumer-oriented web applications (such as Hotmail) developed with a single application instance serving all customers. Multitenant applications represent a natural evolution from this model, offering additional customization to groups of users within (say) the same client organization.

Relationship to virtualization In a multitenancy environment, multiple customers share the same application, running on the same operating system, on the same hardware, with the same data-storage mechanism. The distinction between the customers is achieved during application design, so that customers do not share or see each other's data. This contrasts with virtualization, where components are transformed so that each customer application appears to run on a separate virtual machine. Virtualization nonetheless offers an alternative route to multitenancy that avoids significant architectural change: rather than redesigning an application to serve multiple tenants from a single instance, a provider can use virtualization technology to host multiple isolated instances of the application on one or more servers. This is attractive because redesigning an application for multitenancy can be costly, particularly for software vendors who also continue to offer an on-premises single-tenant version of their product and would otherwise have to maintain two distinct products. When applications are repackaged as virtual appliances, the same appliance image can be deployed in ISV-hosted, on-premises, or trusted-third-party locations, and migrated from one deployment site to another over time.

Economics of multitenancy

Cost savings Multitenancy allows for cost savings over and above the basic economies of scale achievable from consolidating IT resources into a single operation. An application instance usually incurs a certain amount of memory and processing overhead which can be substantial when multiplied by many customers, especially if the customers are small. Multitenancy reduces this overhead by spreading it over many customers. Further cost savings may come from licensing costs of the underlying software (such as operating systems and database management systems). Put crudely, if you can run everything on a single software instance, you only have to buy one software license. The cost savings can be eclipsed by the difficulty of scaling the single instance as demand grows - increasing the performance of the instance on a single server can only be done by buying faster hardware, such as fast CPUs, more memory, and faster disk systems, and typically these costs grow faster than if the load was split between multiple servers with roughly the same aggregate capacity. In addition, development of multitenant systems is more complex, and security testing is more stringent because multiple customers' data is being commingled.

Complexity Because of the additional customization complexity and the need to maintain per-tenant metadata, multitenant applications require a larger development effort. Considerations such as how tenant data is partitioned, how per-tenant schema extensions are stored, and how shared resources are isolated must be taken into account.

Release management Multitenancy simplifies the release management process. In a traditional release management process, packages containing code and database changes are distributed to client desktop and/or server machines; in the single-instance case, this would be one server machine per customer. These packages then have to be installed on each individual machine. With the multitenant model, the package typically only needs to be installed on a single server. This greatly simplifies the release management process, and the scale is no longer dependent on the number of customers. At the same time, multitenancy increases the risks and impacts inherent in applying a new release version. As there is a single software instance serving multiple tenants, an update on this instance may cause downtime for all tenants even if the update is requested and useful for only one tenant. Also, some bugs and issues resulted from applying the new release could manifest in other tenants' personalized view of the application. Because of possible downtime, the moment of applying the release may be restricted depending on time usage schedule of more than one tenant.

Data architecture A central design decision in a multitenant application is how each tenant's data is isolated within shared storage. Three approaches are commonly described:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Multitenancy

Start with the simplest possible case. Write down what Multitenancy claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Multitenancy before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Multitenancy ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Multitenancy

In research
Multitenancy appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Multitenancy in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Multitenancy is common in secondary-school and first-year university syllabi. It links to neighbouring topics Service-oriented (business computing), Software architecture, so understanding it makes those chapters shorter.
In everyday life
Look for Multitenancy outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Multitenancy” →

How to study Multitenancy in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Multitenancy means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Multitenancy out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Multitenancy in simple terms?

Software multitenancy is a software architecture in which a single instance of software runs on a server and serves multiple tenants. Systems designed in such manner are "shared" (rather than "dedicated" or "isolated").

Why does Multitenancy matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Multitenancy?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Multitenancy.

Tags

  • Service-oriented (business computing)
  • Software architecture

Keep exploring