Thursday, January 29, 2015

Multitenancy in HANA

Motivation: I heard a lot of regarding multitenancy recently. In this blog I wanted to sort out basically what the multitenancy is especially with regards to HANA. Eager to hear from you regarding the topic and even to correct me!

Release SPS09 of SAP HANA 1.0 came into spotlights in October of last year. It was flourished that one of the main features of this release is multitenancy. Term tenant is very important within today’s very hot cloud computing. The multitenancy in software architecture terminology means that a single instance of software runs on a server and it is serving multiple tenants. The tenant is a group of users sharing same view on the software they using. Software designed according the multitenant architecture provides every tenant a dedicated share of instance its data, configuration, user management and tenant specific functionality.

To put it simple imagine it as multiple customers running same app on the same server. An infrastructure is shared among them and there is software infrastructure that keeps their data separated even the data is stored in the same database.

It can be said even simpler. To compare it with classic NetWeaver ABAP stack – the tenants are clients in SAP system. All the data is separated in the clients but all system configuration and metadata (e.g. ABAP Data Dictionary) is shared. ABAP system is multitenancy system. All SQL statements like Selects are by default only taking the data from that particular client where they run.

In contrast there is another approach called multi-instance architecture. In this case several separate software instances operate on behalf of different tenants. Note: some of definitions used above are quotes are from wiki.

When it is said that HANA is capable of multitenancy it means there is one single HANA system with its database. In this DB there is configuration stored. Configuration is meant from system wide landscape information which allows configuration and monitoring of the overall system. Additionally there can be N tenant databases in that HANA system. These are storing application data and user management. App and user data is strictly isolated from each other. They share only hardware resources as they all run on the same instance. Users of one tenant database cannot access application data of another tenant. From DB backup and recovery perspective – it is done for every tenant independently from one to another. The HANA’s multitenancy feature is called Multitenant Database Containers (MDC).

By the MDC it is meant that there is one HANA system represented by one SID. Such a system supports multiple applications in different databases and schemas.

Note: these are quotes from SAP Note 2096000 - SAP HANA multitenant database containers.
Following are options available in HANA SPS09 with regards to multitenancy:


HANA DBMS sys
databases
applications
schemas
Standard deployment
1
1
1
1
Multiple Components One Database (MCOD)
1
1
>1
>1
Multiple Components One System (MCOS)
>1
>1 (one DB per system)
1-N
1-N
Multitenant Database Containers (MDC)
1
>1 (one DB per system)
1-N
1-N


Further information:
2096000 - SAP HANA multitenant database containers - Additional Information
2075266 - SAP HANA Platform SPS 09 Release Note
1826100 - Multiple applications SAP Business Suite powered by SAP HANA
1661202 - Support for multiple applications on SAP HANA

2 comments:

Anonymous said...

Hi,
I would like to ask you for a word of clarification: in ABAP database data in clients is separated, but not all ABAP is. How is it HANA? And if I am using MDC - data is unique in column hence in memory only for one client? Multiple clients may have redundant data (from the memory point of view?

Martin Maruskin said...

Hi,

I think that in terms of HANA you were actually speaking in terms of tenants not the clients.

First of all from ABAP perspective: ABAP objects like source code is part of Data Dictionary (DDIC). This is not client specific in NetWeaver based SAP systems. The DDIC objects are shared for all the clients.

Then coming to HANA: my understanding is that it is similar to NetWeaver - ABAP stack. In HANA's MDC setup there can be multiple tenant's databases. They are (from application data and user management point of view) completely separated from each other - as I wrote it in the blog.

So to answer your question: no, in case the data is redundant for different tenants - the data is not stored in one place for these tenants. Instead ti is different columns because it is different tables in different DBs under one HANA system.

As said again - this is just my understanding.
Hope it helps!