RE: How to load-balance on AWS with standalone Tomcats

2015-03-10 Thread Daniel Del Castillo
Thanks for the input! I will let you know how it goes.

Cheers!
DDC


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: 10 March 2015 11:18
To: users@wicket.apache.org
Subject: Re: How to load-balance on AWS with standalone Tomcats

Hi,

In that case I think you don't need custom IPageStore too. It will be redundant.
When a request comes Wicket tries to load the page from the HTTP session first. 
If it is found there then it stores it at the end of the request cycle both in 
the http session and in the disk (IPageStore).
Since you will have a bigger http session (ElastiCache) then I think there is 
no need to copy the same data second time with a custom IPageStore impl.

I don't remember how all this works in 1.4.x, so what I say is for 1.5.0+.
This part of Wicket (IPageStore, IDataStore) has been reworked for 1.5.0 but I 
guess there are no big architectural changes, just implementation changes.

Please let us know how things go!

Good luck!



Martin Grigorov
Funemployed! Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 10, 2015 at 11:26 AM, Daniel Del Castillo 
wrote:

> Hi Martin,
>
> Thanks a lot for your prompt response, that's very helpful.
>
> With regards the session affinity, we'll have a Tomcat Session 
> Manager, which is going to serialise sessions into ElastiCache, 
> configured for each Tomcat instance with the same parameters and this 
> should free us from sticky sessions. Is there any other concerns that 
> I should take into account with regards Wicket Sessions in an environment 
> like this?
>
> Regards,
> DDC
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: 09 March 2015 21:26
> To: users@wicket.apache.org
> Subject: Re: How to load-balance on AWS with standalone Tomcats
>
> Hi,
>
> I think it would be much simpler if you use Tomcat clustering support.
> Wicket 1.4.x is a bit old but as far as I remember the support for it 
> in Wicket has been introduced with 1.4.1 so it should work fine in 1.4.17.
>
> But if Tomcat clustering in not an option for you for some reason then:
> - make sure you use session affinity (aka sticky sessions)
> - create your own IPageStore to keep the serialized view of the pages 
> in shared DB (as you already figured out)
> - no need of custom ISessionStore. You need custom one only in case 
> you want to put your Wicket Session instances in something else than 
> HTTP Session
>
> I guess you are not interested in upgrading to Wicket 6.x but I'd 
> recommend you to upgrade at least to 1.4.22. There were some security 
> fixes in the last few releases from 1.4.x series.
>
>
> Martin Grigorov
> Funemployed! Available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Mar 9, 2015 at 6:09 PM, Daniel Del Castillo 
> 
> wrote:
>
> > Hi list,
> >
> > One of the modules of our application is completely written in 
> > Wicket 1.4.17. This application runs on a single standalone Tomcat 
> > installation.
> >
> > We now need to move this to AWS servers and ensure the service is 
> > 24/7 available. We are looking to have multiple Tomcat instances 
> > (not a
> > cluster) which are load-balanced with ELB.
> >
> > My question is: what do I we need to do in order to achieve this? I 
> > now we'll have to write a IPageStore in order to serialise the page 
> > map into a shared database. Any suggestion on how to do this? Will 
> > we have to write a ISessionStore as well?
> >
> > I've found a solution for clustering (see link below) which I'm now 
> > about to test but I've thought that it'd be useful to try get some 
> > advice from this list.
> >
> > http://letsgetdugg.com/2010/02/07/clustering-wicket-for-fun-and-prof
> > it
> > /
> >
> > Many thanks for your help.
> >
> > Regards,
> > Daniel
> > DDC
> >
> > 
> > --
> >  This transmission is confidential and intended 
> > solely for the person or organization to whom it is addressed. It 
> > may contain privileged and confidential information. If you are not 
> > the intended recipient, you should not copy, distribute or take any 
> > action in reliance on it.
> >
> > If you believe you received this transmission in error, please 
> > notify the sender as soon as possible.
> >
> > This e-mail has been scanned for known viruses by Mimecast for IMD.
> >
> > 
> 

Re: How to load-balance on AWS with standalone Tomcats

2015-03-10 Thread Martin Grigorov
Hi,

In that case I think you don't need custom IPageStore too. It will be
redundant.
When a request comes Wicket tries to load the page from the HTTP session
first. If it is found there then it stores it at the end of the request
cycle both in the http session and in the disk (IPageStore).
Since you will have a bigger http session (ElastiCache) then I think there
is no need to copy the same data second time with a custom IPageStore impl.

I don't remember how all this works in 1.4.x, so what I say is for 1.5.0+.
This part of Wicket (IPageStore, IDataStore) has been reworked for 1.5.0
but I guess there are no big architectural changes, just implementation
changes.

Please let us know how things go!

Good luck!



Martin Grigorov
Funemployed! Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 10, 2015 at 11:26 AM, Daniel Del Castillo 
wrote:

> Hi Martin,
>
> Thanks a lot for your prompt response, that's very helpful.
>
> With regards the session affinity, we'll have a Tomcat Session Manager,
> which is going to serialise sessions into ElastiCache, configured for each
> Tomcat instance with the same parameters and this should free us from
> sticky sessions. Is there any other concerns that I should take into
> account with regards Wicket Sessions in an environment like this?
>
> Regards,
> DDC
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: 09 March 2015 21:26
> To: users@wicket.apache.org
> Subject: Re: How to load-balance on AWS with standalone Tomcats
>
> Hi,
>
> I think it would be much simpler if you use Tomcat clustering support.
> Wicket 1.4.x is a bit old but as far as I remember the support for it in
> Wicket has been introduced with 1.4.1 so it should work fine in 1.4.17.
>
> But if Tomcat clustering in not an option for you for some reason then:
> - make sure you use session affinity (aka sticky sessions)
> - create your own IPageStore to keep the serialized view of the pages in
> shared DB (as you already figured out)
> - no need of custom ISessionStore. You need custom one only in case you
> want to put your Wicket Session instances in something else than HTTP
> Session
>
> I guess you are not interested in upgrading to Wicket 6.x but I'd
> recommend you to upgrade at least to 1.4.22. There were some security fixes
> in the last few releases from 1.4.x series.
>
>
> Martin Grigorov
> Funemployed! Available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Mar 9, 2015 at 6:09 PM, Daniel Del Castillo 
> wrote:
>
> > Hi list,
> >
> > One of the modules of our application is completely written in Wicket
> > 1.4.17. This application runs on a single standalone Tomcat installation.
> >
> > We now need to move this to AWS servers and ensure the service is 24/7
> > available. We are looking to have multiple Tomcat instances (not a
> > cluster) which are load-balanced with ELB.
> >
> > My question is: what do I we need to do in order to achieve this? I
> > now we'll have to write a IPageStore in order to serialise the page
> > map into a shared database. Any suggestion on how to do this? Will we
> > have to write a ISessionStore as well?
> >
> > I've found a solution for clustering (see link below) which I'm now
> > about to test but I've thought that it'd be useful to try get some
> > advice from this list.
> >
> > http://letsgetdugg.com/2010/02/07/clustering-wicket-for-fun-and-profit
> > /
> >
> > Many thanks for your help.
> >
> > Regards,
> > Daniel
> > DDC
> >
> > --
> >  This transmission is confidential and intended solely
> > for the person or organization to whom it is addressed. It may contain
> > privileged and confidential information. If you are not the intended
> > recipient, you should not copy, distribute or take any action in
> > reliance on it.
> >
> > If you believe you received this transmission in error, please notify
> > the sender as soon as possible.
> >
> > This e-mail has been scanned for known viruses by Mimecast for IMD.
> >
> > --
> > -
> >
>
> --
> This transmission is confidential and intended solely for the person or
> organization to whom it is addressed. It may contain privileged
> and confidential information. If you are not the intended recipient, you
> should not copy, distribute or take any action in reliance on it.
>
> If you believe you received this transmission in error, please notify the
> sender as soon as possible.
>
> This e-mail has been scanned for known viruses by Mimecast for IMD.
>
> ---
>
>


RE: How to load-balance on AWS with standalone Tomcats

2015-03-10 Thread Daniel Del Castillo
Hi Martin,

Thanks a lot for your prompt response, that's very helpful.

With regards the session affinity, we'll have a Tomcat Session Manager, which 
is going to serialise sessions into ElastiCache, configured for each Tomcat 
instance with the same parameters and this should free us from sticky sessions. 
Is there any other concerns that I should take into account with regards Wicket 
Sessions in an environment like this?

Regards,
DDC

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: 09 March 2015 21:26
To: users@wicket.apache.org
Subject: Re: How to load-balance on AWS with standalone Tomcats

Hi,

I think it would be much simpler if you use Tomcat clustering support.
Wicket 1.4.x is a bit old but as far as I remember the support for it in Wicket 
has been introduced with 1.4.1 so it should work fine in 1.4.17.

But if Tomcat clustering in not an option for you for some reason then:
- make sure you use session affinity (aka sticky sessions)
- create your own IPageStore to keep the serialized view of the pages in shared 
DB (as you already figured out)
- no need of custom ISessionStore. You need custom one only in case you want to 
put your Wicket Session instances in something else than HTTP Session

I guess you are not interested in upgrading to Wicket 6.x but I'd recommend you 
to upgrade at least to 1.4.22. There were some security fixes in the last few 
releases from 1.4.x series.


Martin Grigorov
Funemployed! Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Mar 9, 2015 at 6:09 PM, Daniel Del Castillo 
wrote:

> Hi list,
>
> One of the modules of our application is completely written in Wicket 
> 1.4.17. This application runs on a single standalone Tomcat installation.
>
> We now need to move this to AWS servers and ensure the service is 24/7 
> available. We are looking to have multiple Tomcat instances (not a 
> cluster) which are load-balanced with ELB.
>
> My question is: what do I we need to do in order to achieve this? I 
> now we'll have to write a IPageStore in order to serialise the page 
> map into a shared database. Any suggestion on how to do this? Will we 
> have to write a ISessionStore as well?
>
> I've found a solution for clustering (see link below) which I'm now 
> about to test but I've thought that it'd be useful to try get some 
> advice from this list.
>
> http://letsgetdugg.com/2010/02/07/clustering-wicket-for-fun-and-profit
> /
>
> Many thanks for your help.
>
> Regards,
> Daniel
> DDC
>
> --
>  This transmission is confidential and intended solely 
> for the person or organization to whom it is addressed. It may contain 
> privileged and confidential information. If you are not the intended 
> recipient, you should not copy, distribute or take any action in 
> reliance on it.
>
> If you believe you received this transmission in error, please notify 
> the sender as soon as possible.
>
> This e-mail has been scanned for known viruses by Mimecast for IMD.
>
> --
> -
>
--
This transmission is confidential and intended solely for the person or 
organization to whom it is addressed. It may contain privileged 
and confidential information. If you are not the intended recipient, you should 
not copy, distribute or take any action in reliance on it.

If you believe you received this transmission in error, please notify the 
sender as soon as possible.

This e-mail has been scanned for known viruses by Mimecast for IMD. 
---



Re: How to load-balance on AWS with standalone Tomcats

2015-03-09 Thread Martin Grigorov
Hi,

I think it would be much simpler if you use Tomcat clustering support.
Wicket 1.4.x is a bit old but as far as I remember the support for it in
Wicket has been introduced with 1.4.1 so it should work fine in 1.4.17.

But if Tomcat clustering in not an option for you for some reason then:
- make sure you use session affinity (aka sticky sessions)
- create your own IPageStore to keep the serialized view of the pages in
shared DB (as you already figured out)
- no need of custom ISessionStore. You need custom one only in case you
want to put your Wicket Session instances in something else than HTTP
Session

I guess you are not interested in upgrading to Wicket 6.x but I'd recommend
you to upgrade at least to 1.4.22. There were some security fixes in the
last few releases from 1.4.x series.


Martin Grigorov
Funemployed! Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Mar 9, 2015 at 6:09 PM, Daniel Del Castillo 
wrote:

> Hi list,
>
> One of the modules of our application is completely written in Wicket
> 1.4.17. This application runs on a single standalone Tomcat installation.
>
> We now need to move this to AWS servers and ensure the service is 24/7
> available. We are looking to have multiple Tomcat instances (not a cluster)
> which are load-balanced with ELB.
>
> My question is: what do I we need to do in order to achieve this? I now
> we'll have to write a IPageStore in order to serialise the page map into a
> shared database. Any suggestion on how to do this? Will we have to write a
> ISessionStore as well?
>
> I've found a solution for clustering (see link below) which I'm now about
> to test but I've thought that it'd be useful to try get some advice from
> this list.
>
> http://letsgetdugg.com/2010/02/07/clustering-wicket-for-fun-and-profit/
>
> Many thanks for your help.
>
> Regards,
> Daniel
> DDC
>
> --
> This transmission is confidential and intended solely for the person or
> organization to whom it is addressed. It may contain privileged
> and confidential information. If you are not the intended recipient, you
> should not copy, distribute or take any action in reliance on it.
>
> If you believe you received this transmission in error, please notify the
> sender as soon as possible.
>
> This e-mail has been scanned for known viruses by Mimecast for IMD.
>
> ---
>