You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jamie <ja...@mailarchiva.com> on 2013/04/12 13:08:38 UTC

multi-tenant web app

Greetings!

I would like some advice with regards to deploying a web app in a 
multi-tenant scenario. A while back, we had a few cloud service 
providers ask us if they could host our web app as a service. Under 
pressure to come with a quick solution, we responded by implementing a 
manager like application (much like the Tomcat manager app), that could 
deploy additional web apps by copying the contents of our WAR file to a 
new directory under webapps . For instance:

webapps\customer1
webapps\customer2
etc.

This approach works but it presents several problems:

  * When there are a large number of webapps, Tomcat takes a long time
    to load. This can be mitigated to a minor extent with TC7's new
    parallel load feature.
  * Tomcat uses alot more memory that it would otherwise since it has to
    load the classes pertaining to each webapp multiple times
  * The contents of one war file is duplicated several times. When there
    are a large number of webapps, it becomes difficult to manage all
    the files and state of the server.

The advantage of the approach is that each web app can potentially run a 
different version of our software.

My question is - how does one configure TC7 such that it will:

  * Have the ability to load the same webapp multiple times, while
    pointing it to one WAR file webapp path
  * Prevent Tomcat from loading the class files and resources of the
    same WAR file multiple times
  * Start up each app as fast possible
  * Such as that the addition of new instances will be as scalable as
    possible.

Much appreciate

Jamie



Re: multi-tenant web app

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jamie,

On 4/12/13 7:08 AM, Jamie wrote:
> I would like some advice with regards to deploying a web app in a 
> multi-tenant scenario. A while back, we had a few cloud service 
> providers ask us if they could host our web app as a service.
> Under pressure to come with a quick solution, we responded by
> implementing a manager like application (much like the Tomcat
> manager app), that could deploy additional web apps by copying the
> contents of our WAR file to a new directory under webapps .

So a vendor came to you -- unsolicited -- and asked if they could
deploy your webapp to the cloud and instead of saying "you figure it
out", you decided to instead spend your own resources to "come to a
quick solution"? Talk about the wail wagging the dog...

I'm shocked that the cloud provider didn't simply suggest that you
deploy thousands of separate webapps. That would certainly run-up the
cost and make them very happy.

Honestly, if the webapp wasn't built with multi-tenancy in mind,
there's no magic you can add to it from the outside in order to make
it multi-tenant friendly.

You can play tricks with ClassLoaders to minimize memory usage, but
you'd better be careful that there aren't static caches or other nasty
surprises that will cause the walls to come crumbling down.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRba0pAAoJEBzwKT+lPKRY/vEQAJwb1A4rc7Y5Au9zK7RLRiB9
yiBogKO2/gOHlpSaBVm3wmzpo2/D8fqlGkooWMl2WctshzEJSt8Q40TSkn28vfhw
3FZDIIoVFThqBwi1fcipKxRiGEmiyfvfo9o2uO7XtGhoE0dcdhSykmLHWrRCcI5Q
Od6QCoC3Nn/sblvGSQsWQ64WQvinvZJr3mNbSqt8K6i6pK9ysf/nwGEmLCx4PWxh
1s9Z8qKKGlJLsD4l8OG4UHvlFJ51iMITK+23rpj+SmmUKGFRlsdivkPhtK67634D
xe+2UWD0t/nvVRh0QUFrv3r3d3oSzg1/LtVtKcdjEHG79FcN15ZGxWUR7e4WXIhe
cMSbkqYk3I1+emKJyl4AWABclEfriO7AQEYHapnRjdZ65Vz2aPJdY5Jr/BJ7WZIh
Zkl9M2XHRvVCJQHmtqvYEH6iun4vIcZXt6Euby0dwfNdvTb+Z5p2eNFN/wi8D/1o
qwLQ8LGpsGffuwatriB9rxA69YJ+6FdN6LLmcGG2Qjb1K3Fgp3wBWceqQ89yfblI
z8iNXfLxnRoGqm2H72q6wozQgkbMpdSD37o6Q8dQ5+6WiHDSdI680k3EsgFxzm6Y
q4ZLmne2S3zJxjLUGHPK/Fa8sfg8szhHIQQGqm7JcESc5J4MKgVBMwXBignnOvgz
YNsIauMPh8LRZdZytS3g
=2EuS
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: multi-tenant web app

Posted by Mark Thomas <ma...@apache.org>.
On 17/04/2013 18:28, Jamie wrote:
> Dear Tomcat Users
> 
> Forgive me for saying this (and unless I am still misinformed after
> scouring the Internet for a solution), the Tomcat app server seems
> wholly inadequate for the demands of modern multi-tenant SAAS
> applications. Multi-tenant SAAS apps are supposed to be light weight and
> have the ability to scale. Sure, you can implement multi-tenant features
> inside the web app, but it makes sense that the functionality should be
> provided as part of the app server. The current business of deploying
> separate WARs is not practical/efficient for multi tenant use. We should
> be able to simply flag a context as multi instance. The instances should
> under the same classloader in a very light weight fashion.
> 
> Is there any chance the Tomcat dev team would look into adding this?
> 
> Your thoughts are appreciated

Patches welcome.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: multi-tenant web app

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jamie,

On 4/18/13 6:42 AM, Jamie wrote:
> Chris / Tomcat Users
> 
>> This can already be done with the common or shared classloaders
>> (which were removed by default because nobody could make head or
>> tail of how to use them properly). They can be trivially
>> re-enabled using conf/catalina.properties.
> 
> I found some vague references to this in Tomcat docs, but nothing 
> concrete. Can you offer actual specifics on how to:
> 
> a) Modify catalina.properties file to get all web apps to run under
> the same class loader

This behavior (all in one ClassLoader) would break the servlet spec:
each webapp requires a separate ClassLoader.

What you can do is re-enable the "shared" and "common" ClassLoaders,
and move your libraries into the appropriate directories. Read the
Tomcat Users' Guide under "Class Loading" and then read the comments
in conf/catalina.properties.

> b) (if possible) Modify Tomcat's context configuration such that 
> multiple instances of a web app can be loaded from the same class
> files, libs and resources on disk

You can do this via ClassLoader games described above.

Note that things like logging won't work the way you want them to
(e.g. one log file per tenant) if you throw the logging libraries into
the shared ClassLoader.

> I am aware that there are alot of issues to consider, esp. when it
> comes to Java's dreaded class loader architecture.

I don't dread anything about Java's ClassLoader architecture. I quite
like the way it operates, though I would prefer if a SecurityManager
could be configured to treat different ClassLoaders in different ways,
rather than having to bless JAR files individually.

> There must be a better way. We could:
> 
> 1) try to configure Tomcat with its mysterious (largely
> undocumented) multi tenant features

Other than playing ClassLoader games, Tomcat does not have any
multi-tenant features, mysterious or otherwise.

> 2) Modify the Tomcat source code to do what we want (problem here
> is it will take time for us to understand Tomcat's complex code
> base)

If you propose some good ideas, you might not have to write anything.

> 3) Build the multi-tenant capability into our app.
> 
> Despite what you say, I still feel, logically, the app server
> should provide the multi-tenant capability. It would provide huge
> savings for developers under pressure to move their applications to
> the cloud.

Are you primarily interested in reducing the amount of memory required
to run your webapps? java.lang.Class objects don't take up much space
in memory... it's the objects your webapp creates that are going to be
the bulky stuff. So, if you want to run with 50 tenants, you'll need
50 times as much RAM for working-heap, regardless of the number of
webapps deployed.

>> 2. Any shared data in the libraries themselves can allow
>> information to leak from one tenant to another.
> 
> Yes, of course this is a risk we take.

I think this is what it ultimately likely to ruin everything.

>> So, your webapp itself does have to have some measure of
>> multi-tenancy awareness. Multi-tenancy isn't just something you
>> can slip-in at the
> infrastructure-level.
> 
> I agree that the issues can be complex. However,  some of the
> complexity comes about because Tomcat was inherently designed
> support running different web applications on the same server. The
> reality is that in today's world, a bigger use case is to want to
> run multiple instances of the same app in a very light weight,
> scalable and easy-to-manage fashion.

Amazon Elastic Beanstalk?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRcBx/AAoJEBzwKT+lPKRYv9sP/iNtyzcrExKwbE26+RsyROZk
odMSzwwpJgZnzVpDI2XKqRYMEppHUB1pDbqj7tkSrc2wOaSBH2nC81KO5/PdHzZ5
lofC92D8ST/PQhhSuPKQxVCBOkChqdVpj9A0eDLNlDHKIjffeLsDYjg++NU55s8V
uvDjRjhtEdbixgflfrm9qUV9TnrfEIJHgLwpInq3rwSoHcRwPkJ8+59NOd0osYaC
MIlOLL2TUah8IBAv/W5prROIKjNCP9rboYdLgw0FHfZ1MeA7WPtMtKIEMPVU6io+
ploVb44TDGMnvp1UZsA/h58qmT1aycmdA88WY51BcGSx7f+QiqboXEqDT6vtlRIg
HvYly/ksodCOrUfEk7k3GGpd0O1qQWVmIEyKG0GiY/nJyP0gQ7579fFbFk++5Zug
SAhi+KHC/bNuuSSg1tPDddDz/DhV1fBrgBkRyPj2Bzx1GxL1DP5vTRFxqERTNtvk
OU8PBzK+wUnQjAoE25hAv+iceVAMoSJWZ/y7IHnoAjk7u9AThxrYhKG/jY5pN2uO
akIx5NhwRJlmpyWFCPhU1xVktpiHJyiSgD05F8TDUKjI4yZQI7/aypi1D9zchOzv
5u+au2qwOmwpL7wszWBwSA79d4lrw6vhjgX5atQzIsNkO8YHt9uDGsGpsXIYXF1n
auXi4uHR1cUrKUhQ8Usj
=il1p
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: multi-tenant web app

Posted by Jamie <ja...@mailarchiva.com>.
Chris / Tomcat Users

 >This can already be done with the common or shared classloaders (which
 >were removed by default because nobody could make head or tail of how
 >to use them properly). They can be trivially re-enabled using
 >conf/catalina.properties.

I found some vague references to this in Tomcat docs, but nothing 
concrete. Can you offer actual specifics on how to:

a) Modify catalina.properties file to get all web apps to run under the 
same class loader
b) (if possible) Modify Tomcat's context configuration such that 
multiple instances of a web app can be loaded from the same class files, 
libs and resources on disk

I am aware that there are alot of issues to consider, esp. when it comes 
to Java's dreaded class loader architecture. I certainly didn't mean to 
give you the impression that I thought it was as simple as flicking a 
switch. We in fact wrote an entire management application with 
sophisticated GUI that integrates with Tomcat's API's to support multi 
instance deployment. The solution works. In some cases, we have as many 
as eighty different web apps running under one server. The problem is we 
don't like our current solution. It is uses up more resources than we 
like. Furthermore, the proliferation of web apps introduces a management 
headache. When there are a large number web apps, the Tomcat server also 
takes an age to start.

There must be a better way. We could:

1) try to configure Tomcat with its mysterious (largely undocumented) 
multi tenant features
2) Modify the Tomcat source code to do what we want (problem here is it 
will take time for us to understand Tomcat's complex code base)
3) Build the multi-tenant capability into our app.

Despite what you say, I still feel, logically, the app server should 
provide the multi-tenant capability. It would provide huge savings for 
developers under pressure to move their applications to the cloud.

 >Note however that there are a whole slew of potential severe problems
 >with simply playing ClassLoader games:

 >1. You likely can't have a different version of library X for one
 >single tenant (you can put it into WEB-INF/lib but it might not be
 >visible from the right place and/or might conflict badly with the
 >shared library)

Well, if you will permit me to apply some creative thinking here, I 
could envision a situation where there was an xml file with any number 
of virtual contexts organized into groups. Each group could refer to a 
specific version of the web app on disk.  Tomcat would load each group 
of virtual contexts into a separate class loader. All virtual contexts 
in the same group would be loaded into the same class loader. Using this 
mechanism, the number of web apps on disk would be limited to the number 
of versions of the web app. Furthermore, it would be possible to run as 
many instances of each version as needed in a lightweight fashion.

 >2. Any shared data in the libraries themselves can allow information
 >to leak from one tenant to another.

Yes, of course this is a risk we take.

 >So, your webapp itself does have to have some measure of multi-tenancy
 >awareness. Multi-tenancy isn't just something you can slip-in at the 
infrastructure-level.

I agree that the issues can be complex. However,  some of the complexity 
comes about because Tomcat was inherently designed support running 
different web applications on the same server. The reality is that in 
today's world, a bigger use case is to want to run multiple instances of 
the same app in a very light weight, scalable and easy-to-manage fashion.

Many thanks in advance for your input

Best Regards

Jamie

Re: multi-tenant web app

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jamie,

On 4/17/13 1:28 PM, Jamie wrote:
> Dear Tomcat Users
> 
> Forgive me for saying this (and unless I am still misinformed
> after scouring the Internet for a solution), the Tomcat app server
> seems wholly inadequate for the demands of modern multi-tenant
> SAAS applications. Multi-tenant SAAS apps are supposed to be light
> weight and have the ability to scale. Sure, you can implement
> multi-tenant features inside the web app, but it makes sense that
> the functionality should be provided as part of the app server. The
> current business of deploying separate WARs is not
> practical/efficient for multi tenant use. We should be able to
> simply flag a context as multi instance. The instances should under
> the same classloader in a very light weight fashion.
> 
> Is there any chance the Tomcat dev team would look into adding
> this?

This can already be done with the common or shared classloaders (which
were removed by default because nobody could make head or tail of how
to use them properly). They can be trivially re-enabled using
conf/catalina.properties.

Note however that there are a whole slew of potential severe problems
with simply playing ClassLoader games:

1. You likely can't have a different version of library X for one
single tenant (you can put it into WEB-INF/lib but it might not be
visible from the right place and/or might conflict badly with the
shared library)

2. Any shared data in the libraries themselves can allow information
to leak from one tenant to another.

So, your webapp itself does have to have some measure of multi-tenancy
awareness. Multi-tenancy isn't just something you can slip-in at the
infrastructure-level.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRbuHIAAoJEBzwKT+lPKRY22IQAJyr2H7dYBFQWUE30ihnkeuc
2UtX2gmKy7yEUHtmdUG62xwarlzsZHgnLBJv+5Vme4IOSWtGguOAGyWSKv/Ga+pg
2BHXeMv9LlGnMGxXJDrsRLvY/On/DRBq/t5RGY4Qt9ta5QT897X5qoxuehpPSZb1
vCU/JVpmwIDYdPYYpEy056ExhF1jTpwVJJcS6A3YX7EpS/aMSqLzjansKVyVOsgs
XpCs0NdHD4x26OelRmoWscSqz3vroeStGWPt3+dlXe5hPtYk96JSeRfsQCCvN2Lx
5xW9XzGNxMtwMUuXAnCPqYHLCm2a1Vj1w3hrbA7O/HcpGOMMsCYCzEuSMwT0EgD/
fA917ggzenI4gRUQZsuSknAD5jc65t1f1uMnr1xoPBKSdc9uaVAZvK8+7HTsbeVL
KSiRJVM3LO4X23XH6Qv6rHfZLkvcBL28Y/mTsRV4twV/eoPI6PQ314RWAd7V9LWI
GqvknF3nKLN/Wye+2SHdfE4GQKCOMUR7unFgNvcLcUlklfbBNRrwRTORKbcKaOo7
sgQkqFbTqx2IFCVxWl+51ezmmGRZo58GrwYb2FxTOvqlPku7M3bI9zjaOeZ2DAay
1g+k/+4PeP+ZtaE7v+fACjr421PcuEKHEzQs1NGf18sK+n0JqLr/WJeiednew5Uj
Z5DjVEs0NuVEAwnIzOAw
=fKOm
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Re: multi-tenant web app

Posted by Jamie <ja...@mailarchiva.com>.
Dear Tomcat Users

Forgive me for saying this (and unless I am still misinformed after 
scouring the Internet for a solution), the Tomcat app server seems 
wholly inadequate for the demands of modern multi-tenant SAAS 
applications. Multi-tenant SAAS apps are supposed to be light weight and 
have the ability to scale. Sure, you can implement multi-tenant features 
inside the web app, but it makes sense that the functionality should be 
provided as part of the app server. The current business of deploying 
separate WARs is not practical/efficient for multi tenant use. We should 
be able to simply flag a context as multi instance. The instances should 
under the same classloader in a very light weight fashion.

Is there any chance the Tomcat dev team would look into adding this?

Your thoughts are appreciated

Jamie

  On 2013/04/16 8:52 PM, Pïd stèr wrote:
> On 12 Apr 2013, at 12:00, Jamie <ja...@mailarchiva.com> wrote:
>
>> Greetings!
>>
>> I would like some advice with regards to deploying a web app in a multi-tenant scenario. A while back, we had a few cloud service providers ask us if they could host our web app as a service. Under pressure to come with a quick solution, we responded by implementing a manager like application (much like the Tomcat manager app), that could deploy additional web apps by copying the contents of our WAR file to a new directory under webapps . For instance:
>>
>> webapps\customer1
>> webapps\customer2
>> etc.
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: multi-tenant web app

Posted by Pïd stèr <pi...@pidster.com>.
On 12 Apr 2013, at 12:00, Jamie <ja...@mailarchiva.com> wrote:

> Greetings!
>
> I would like some advice with regards to deploying a web app in a multi-tenant scenario. A while back, we had a few cloud service providers ask us if they could host our web app as a service. Under pressure to come with a quick solution, we responded by implementing a manager like application (much like the Tomcat manager app), that could deploy additional web apps by copying the contents of our WAR file to a new directory under webapps . For instance:
>
> webapps\customer1
> webapps\customer2
> etc.
>
> This approach works but it presents several problems:
>
> * When there are a large number of webapps, Tomcat takes a long time
>   to load. This can be mitigated to a minor extent with TC7's new
>   parallel load feature.
> * Tomcat uses alot more memory that it would otherwise since it has to
>   load the classes pertaining to each webapp multiple times
> * The contents of one war file is duplicated several times. When there
>   are a large number of webapps, it becomes difficult to manage all
>   the files and state of the server.
>
> The advantage of the approach is that each web app can potentially run a different version of our software.

If it's different versions, you can't avoid loading the jars in each
case, can you?


> My question is - how does one configure TC7 such that it will:
>
> * Have the ability to load the same webapp multiple times, while
>   pointing it to one WAR file webapp path

Just script the deployment process, if the management overhead is high.


> * Prevent Tomcat from loading the class files and resources of the
>   same WAR file multiple times

Can't be done. You can put jars in tomcat/lib, if they're safe and as
long as you don't put the same jars or different versions of them
elsewhere on the classpath.


> * Start up each app as fast possible

App specific, talk to your devs.


> * Such as that the addition of new instances will be as scalable as
>   possible.

There's no magic bullet & I find that attempts to rationalise like
this often lead to problems later.


p


> Much appreciate
>
> Jamie
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: multi-tenant web app

Posted by Ty <ty...@gmail.com>.
On Fri, Apr 12, 2013 at 6:08 AM, Jamie <ja...@mailarchiva.com> wrote:

> Greetings!
>
> I would like some advice with regards to deploying a web app in a
> multi-tenant scenario. A while back, we had a few cloud service providers
> ask us if they could host our web app as a service. Under pressure to come
> with a quick solution, we responded by implementing a manager like
> application (much like the Tomcat manager app), that could deploy
> additional web apps by copying the contents of our WAR file to a new
> directory under webapps . For instance:
>
> webapps\customer1
> webapps\customer2
> etc.
>
> This approach works but it presents several problems:
>
>  * When there are a large number of webapps, Tomcat takes a long time
>    to load. This can be mitigated to a minor extent with TC7's new
>    parallel load feature.
>  * Tomcat uses alot more memory that it would otherwise since it has to
>    load the classes pertaining to each webapp multiple times
>  * The contents of one war file is duplicated several times. When there
>    are a large number of webapps, it becomes difficult to manage all
>    the files and state of the server.
>
> The advantage of the approach is that each web app can potentially run a
> different version of our software.
>
> My question is - how does one configure TC7 such that it will:
>
>  * Have the ability to load the same webapp multiple times, while
>    pointing it to one WAR file webapp path
>  * Prevent Tomcat from loading the class files and resources of the
>    same WAR file multiple times
>  * Start up each app as fast possible
>  * Such as that the addition of new instances will be as scalable as
>    possible.
>
> Much appreciate




>
> Jamie
>
>
>

+1.  Would love to hear what others do about this.  In my experience, what
Jamie describes (running lots of similar/identical apps side by side in the
same container) and the resulting overhead (long load times, bigger memory
footprint, massive duplication of webapp files) is the norm that folks have
just learned to deal with in one way or another.

Re: multi-tenant web app

Posted by Rainer Frey <ra...@inxmail.de>.
On 18.04.2013, at 15:37, Jeffrey Janner <Je...@PolyDyne.com> wrote:
>> Here's a real world example of doing this, by JFRog regarding their
>> Artifactory SAAS. Spoiler: the crucial point is putting as many
>> dependencies as possible into the shared classloader (where "possible"
>> is not as easy as it sounds:
>> 
>> http://www.youtube.com/watch?v=tE3eo0CuQCc
>> 
>> Rainer
> 
> Rainer, 
> That's a very long video to sit through, but it looks interesting.  Any chance someone's summarized it somewhere?

It was a JavaOne session, don't know if the slides are available for public.
The interesting part w.r.t this thread starts at about 18:00 in the video. Before that, the discuss multi tenancy and SAAS in general and why they chose the strategy of one web app per tenant.

Summary of the core part is: in-depth review every used library for any kind of shared state:
* static references in the classes
* specifically global (static) registries
* caches
* thread pools
* loggers
Work with the developers to remove them or run own forks if that doesn't work out. And review again on new releases.
They show some specific examples in libraries they use.

Later (from around 35:00) they discuss how this approach changed their development and release process, and the last minutes are Q&A (don't remember if that was relevant). 

Rainer





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: multi-tenant web app

Posted by Jeffrey Janner <Je...@PolyDyne.com>.
> -----Original Message-----
> From: Rainer Frey [mailto:rainer.frey@inxmail.de]
> Sent: Thursday, April 18, 2013 12:51 AM
> To: Tomcat Users List
> Subject: Re: multi-tenant web app
> 
> 
> On 12.04.2013, at 13:08, Jamie <ja...@mailarchiva.com> wrote:
> 
> > Greetings!
> >
> > I would like some advice with regards to deploying a web app in a
> multi-tenant scenario. A while back, we had a few cloud service
> providers ask us if they could host our web app as a service. Under
> pressure to come with a quick solution, we responded by implementing a
> manager like application (much like the Tomcat manager app), that could
> deploy additional web apps by copying the contents of our WAR file to a
> new directory under web apps .
> 
> Here's a real world example of doing this, by JFRog regarding their
> Artifactory SAAS. Spoiler: the crucial point is putting as many
> dependencies as possible into the shared classloader (where "possible"
> is not as easy as it sounds:
> 
> http://www.youtube.com/watch?v=tE3eo0CuQCc
> 
> Rainer

Rainer, 
That's a very long video to sit through, but it looks interesting.  Any chance someone's summarized it somewhere?
Jeff


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: multi-tenant web app

Posted by Rainer Frey <ra...@inxmail.de>.
On 12.04.2013, at 13:08, Jamie <ja...@mailarchiva.com> wrote:

> Greetings!
> 
> I would like some advice with regards to deploying a web app in a multi-tenant scenario. A while back, we had a few cloud service providers ask us if they could host our web app as a service. Under pressure to come with a quick solution, we responded by implementing a manager like application (much like the Tomcat manager app), that could deploy additional web apps by copying the contents of our WAR file to a new directory under web apps .

Here's a real world example of doing this, by JFRog regarding their Artifactory SAAS. Spoiler: the crucial point is putting as many dependencies as possible into the shared classloader (where "possible" is not as easy as it sounds:

http://www.youtube.com/watch?v=tE3eo0CuQCc

Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org