Does Lagom support multitenancy?

Does Lagom support multitenancy?

Our suggestion is to not go down this path. Multi-tenancy was very popular back in the time when people used to deploy one single application on a huge application server. In the era of cloud computing, it's much easier to have different deployments, per tenant, and dimensioned according to their individual needs. Of course that adds pressure on the operation side as you will need to manage and monitor each one of them.

Ultimately, having separated deployments is a better solution because you can easily remove it and delete all tenants data without affecting the others. Also, if you have a tenant heavily using the system, you can scale up their installation accordingly and their usage won't affect the other tenants. Additionally, you can even have different billing plans according to their needs and usage.

That said, if you really want to have them cohabiting the same Lagom deployment, you will need to partition the data using the tenant id. You will need to take that in account on every single place in your application. This will also add complexity to your application, and is why we suggest the above approach instead.
    • Related Articles

    • How to implement versioning in Lagom microservices?

      Lagom doesn't provide any solution, plugin or feature that enables API versioning. However you can use the following to decide and pick what works best for you: When versioning you must keep in mind both the service endpoints and payloads and the ...
    • Can Lagom errors be handled using Play error handling?

      No, the Play error handler is not invoked from Lagom, because the Lagom exception serializer intercepts it first. Any exception thrown by application code will be wrapped in a transport exception, serialized to json and a response is built from it. ...
    • Why don't I see support for our tracing solution?

      If you do not see specific support for your solution, then you can likely use OpenTracing. Lightbend Telemetry has support for OpenTracing, which is a vendor neutral set of common API’s that play well with most of the existing distributed tracing ...
    • Can I customize error handling in Lagom?

      Yes, the best way to customize error handling in Lagom is to use a custom ExceptionSerializer.  This Knoldus blog post explains it well: https://blog.knoldus.com/2018/02/05/exception-serializer-in-lagom/ That example, however, is more focused on how ...
    • Should Kafka act as the source of truth in Lagom?

      > We are using Lagom with event sourcing and CQRS. Would you say that keeping the source of truth on the Kafka side is an option? Pragmatism always wins the day, and with that being said this idea has plenty of merit. The only concern we have with ...