cancel
Showing results for 
Search instead for 
Did you mean: 

Multitenant Persitence with SAP HANA Service. Differences Between NEO and Cloud Foundry

christophroth
Explorer

Hello,

we are currently evaluating cloud foundry after 4 years on NEO and there came up some question about multienant-architecture with the SAP HANA Service.


I've also read some guides like https://blogs.sap.com/2018/09/17/developing-multitenant-applications-on-sap-cloud-platform-cloud-fou..., but there are still open questions.

Lets first have a look, how we would implement multitenancy with SAP HANA Service in NEO, and what advantages we have:

On NEO we are using Multitenant-Database-Containers, to seperate the data of different tenants and we are creating one DataSource-Binding for each tenant. (Using dynamic data source lookups)


This architecture brings the following advantage:
- Data between tenants are strongly seperated
- Every tenants has its own database backups automatically managed by the SAP HANA System, so we are able to restore a backup for one tenant, without affecting any other tenant. link
- Memory usage per each tenant can be individuallly configured, to prevent one tenant to use all ressource or to crash other tenants
- Tenant containers and DataSource-Bindings can be added at runtime automatically via console client
- If the ressources of the database system are not enough anymore cause the tenants need more ressources or there are new tenants subscribing to the application, we are able to upsize the database system

So now lets have a look at a possible architecture in the Cloud Foundry environment:

On CF i would create a single SAP Hana Service, and would create 1 SAP HANA Schema Service Instance for each tenant and bind this to the application.


Now i see the following differences/problems:


- There are no multitenant database containers available at CF, so to seperate data between tenants we have only to serious options: "1 Schema per tenant, 1 Database Service Instance per Tenant". The problem with 1 Database Service Instance per tenant, is that this is a very expensive option, cause the minimum size for a database system is 32 GB and the recommended size 64 GB (4 Blocks). And there will also be additional maintenance effort cause there are more database systems to update, monitore and maintain. So we are currently looking at schema seperation per each tenant.
- With schema seperation we have found no way to create and restore backups per schema/tenant
- With schema seperation we have found no way to limit the memory usage per tenant
- On CF we have found no way to upsize a database system when new tenants subscribe or when the memory of the current system is not enough anymore
- A service-binding between a tenant and an application needs an application restart, cause the service information are provided via environment variables and cannot added ad runtime like in NEO

So now my questions are:
- Is my understanding of the SAP HANA Service in CF correct?
- Is there a way to get MDC-SAP-HANA-Systems in CF?
- Is there a possibility to create and restory backups per each schema/tenant in a non MDC-System?
- Is it possible to upsize a SAP HANA-Service in CF?
- Whats the recommended way to seperate tenant data in CF and SAP HANA (all Tutorials with code samples i found was done with a tenant descriptor column in the tables, but thats not an serious option for us)

Best regards

Christoph

View Entire Topic
0 Kudos

Hi guys,

For the record, the links provided by Jan point to a pretty old version of the documentation: SAP HANA 1.0 SPS12. Perhaps this is because the scenarios described are running on SAP HANA 1.0 SPS 12, however, for SAP HANA 2.0 SPS 04, you can find the latest version of the HDI Containers topic here:

While the HDI-Container topic Jan points to might be unchanged (or very similar) in the new version of the XSA Developer Guide, the rest of the new version of the guide contains a lot of updated content which might be of help here.

Please also note that the new HDI Reference Guide provides lots of information about HDI administration (including export/import of HDI containers) as well as descriptions and code examples showing how to use the HDI SQL API to develop content on SAP HANA on-premise platforms, which you can find here:

A Cloud-focused version of the HDI Reference Guide will also be made available at some point soon.

Best regards,

Geoff