Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michaël Vanbrabandt 863 posts 3346 karma points c-trib
    Aug 18, 2016 @ 13:10
    Michaël Vanbrabandt
    0

    One Umbraco installation with muliple databases ( Multi Tenant SaaS )

    Hi,

    is it possible to use one Umbraco installation over multiple databases?

    And based on the subdomain it uses the correct database.

    Example:

    http://tenant1.domain.be opens database DbTenant1

    http://tenant2.domain.be opens database DbTenant2

    If its possible, how do I setup tis kind of Multi Tenancy? Because if I look into the code I see that the Database is setup during application startup ( boot manager ).

    Or can we override this in some way to look up the subdomain on every request in the UmbracoApplication and setup a new database connection?

    /Michaël

  • Damiaan 440 posts 1295 karma points MVP 4x c-trib
    Aug 22, 2016 @ 11:44
    Damiaan
    0

    I don't think it would be wise to spread one CMS / website installation over multiple databases. Why would you need such a setup?

    If you would like to try, I guess you will need to interfere with the ApplicationContext.Current.DatabaseContext.ConnectionString (which is only a getter). You get the picture...

    To have multiple tenants, you have multiple options:

    1. have multiple root nodes with a domain in umbraco (and share database)
    2. have multiple websites and databases (or schema's if you want) and make your website redeployable with versioning and migrations (that's how we do it)
  • Michaël Vanbrabandt 863 posts 3346 karma points c-trib
    Aug 23, 2016 @ 08:53
    Michaël Vanbrabandt
    0

    Hi Damiaan,

    I was just wondering if I could use Umbraco as the flatform to build an application with only the backend interface ( so no frontend content delivery ) for a multi tenant application.

    But indeed after researching the code I did see that for setting another connectionstring it was not possible.

    /Michaël

  • Damiaan 440 posts 1295 karma points MVP 4x c-trib
    Aug 25, 2016 @ 20:45
    Damiaan
    100

    I have seen it once, where they used the backend for an administration (not multi tenant).

    We are developing umbraco websites since version 4.0. We have one (multi tenant) application. And it is not running in Umbraco. Except the public facing, marketing and related websites (of cource).

    We are not planning on changing this. Because I love the flexibility to wire up everything yourself - just as it suits the application.

    Certainly if you start thinking about:

    • dynamically loading widgets depending on the customer
    • using other datastores than sql (hello blob, table or document storage).
    • putting customers on better performing tiers
    • ...

    I love umbraco, but Umbraco is just not suited for these type of thing.

    IMHO...

  • Michaël Vanbrabandt 863 posts 3346 karma points c-trib
    Aug 26, 2016 @ 06:23
    Michaël Vanbrabandt
    0

    Hi Damiaan,

    thanks for sharing your experiences!

    /Michaël

  • Developer 22 posts 123 karma points
    Jan 17, 2019 @ 05:48
    Developer
    0

    Hi Michaël,

    Did you find any solution for one Umbraco installation over multiple databases? I am looking for similar functionality with Umbraco.

    Can you please suggest any idea or share your experience?

Please Sign in or register to post replies

Write your reply to:

Draft