Scalable architecture for lucee app

Hey guys,

My app is currently running on Railo and I would like move it to Lucee. In
doing so, I am also getting into Docker and exploring setting up my Lucee
application to run on Amazon’s EC2 container service or on DigitalOcean. I
have some high level questions for anyone who has any experience running a
Lucee app in containers, or at least has a better understanding of how
Lucee works than I do (so in that case, pretty much all of you haha). My
goal is to get away from my current single VPS server approach (in
production) and have a horizontally scalable architecture for my
application.

  1. Would it make sense to have Apache or Nginx serve as the load balancer
    (routing request to one of many “Lucee” containers/boxes)? I’m thinking
    yes, but I’m not experienced in this area.
  2. Would it ever make sense to have Lucee and Tomcat running on different
    containers or boxes from each other? My understanding of “proper”
    containerization is that having each service broken onto it’s own container
    is the correct approach. It seems odd to me to have Tomcat and Lucee on
    different containers, but I’m not experienced in this area either. Thoughts?
  3. Assuming you wanted to support lots of concurrent users, would it be
    reasonable to have all your Lucee/Tomcat instances talking to a single db
    layer/container in MySQL, or would another approach be recommended?

Thanks for your insight,
Brian

I don’t have “the” answer, but having experienced the recent sustained DDoS
attack on Linode, “scalable” should ideally avoid a single point of
failure. It’s dead easy to setup Nginx for load balancing, but unless you
incorporate robust DNS failover into the mix, your load balancer is going
to be the most vulnerable link.

I also looked into CloudFlare and Fastly during the attack - perhaps a CDN
might be worthwhile to consider.

Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamediaOn Mon, Feb 15, 2016 at 10:51 PM, Brian FitzGerald <@Brian_FitzGerald> wrote:

Hey guys,

My app is currently running on Railo and I would like move it to Lucee. In
doing so, I am also getting into Docker and exploring setting up my Lucee
application to run on Amazon’s EC2 container service or on DigitalOcean. I
have some high level questions for anyone who has any experience running a
Lucee app in containers, or at least has a better understanding of how
Lucee works than I do (so in that case, pretty much all of you haha). My
goal is to get away from my current single VPS server approach (in
production) and have a horizontally scalable architecture for my
application.

  1. Would it make sense to have Apache or Nginx serve as the load balancer
    (routing request to one of many “Lucee” containers/boxes)? I’m thinking
    yes, but I’m not experienced in this area.
  2. Would it ever make sense to have Lucee and Tomcat running on different
    containers or boxes from each other? My understanding of “proper”
    containerization is that having each service broken onto it’s own container
    is the correct approach. It seems odd to me to have Tomcat and Lucee on
    different containers, but I’m not experienced in this area either. Thoughts?
  3. Assuming you wanted to support lots of concurrent users, would it be
    reasonable to have all your Lucee/Tomcat instances talking to a single db
    layer/container in MySQL, or would another approach be recommended?

Thanks for your insight,
Brian


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/30035782-e66f-4451-8c04-8bcde2959421%40googlegroups.com
https://groups.google.com/d/msgid/lucee/30035782-e66f-4451-8c04-8bcde2959421%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Let me highlight the biggest question mark for me and see if I can prompt
some further insight… have you ever run (or considered running) Tomcat
and Lucee on separate containers (or vm’s, or physical machines), or in
your opinion should they always be run within the same environment?

In my completely naive opinion, they should always be run within the same
environment :wink: Why would you want them in separate environments ( if it is
possible … )?

By the way, regarding your question 3 about MySql, you could take a look at
Google Cloud Sql … https://cloud.google.com/sql/docs/introduction , which
is a relatively painless way to achieve “data replication between multiple
zones with automatic failover” when using MySql.

it sounds to me like Lucee and Tomcat should ALWAYS live together in
the same environment/server/vm/docker container (regardless of the
scale of your application)
right, because as I wrote in the previous email – /Lucee runs inside
Tomcat/. Tomcat, as a servlet container, provides APIs and
infrastructure to Lucee which enables it to work properly. while you
could, theoretically, separate the two, it would make no sense to do so
as many things will work differently than they should (some features
will probably not work at all), and everything will run much slower due
to latency involved with communicating between the two containers.

So it would be:

  • layer 1) web layer (apache or nginx serving as load balancer)
  • layer 2) app layer (multiple instances of lucee and tomcat
    together on each instance serving the application)
  • layer 3) db layer (MySQL serving db access).

that would work. if you feel a need, and can afford it, you might want
to add a load balancer as mentioned earlier in the thread, a firewall
appliance (can be the same appliance as the LB), cluster session
management if you use sessions, and database replication with failover
in case the primary fails.

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 2/16/2016 9:44 AM, Brian FitzGerald wrote:

Hey guys,

I really appreciate you all chiming in; you’re awesome. Actually, I am
NOT talking about separating nginx (or apache) and lucee/tomcat, that
I am already reasonably sure I will end up doing. Igal was right to be
confused in that I am indeed talking about the possibility of
separating Lucee itself and Tomcat onto separate servers/docker
containers (with the intention of executing a microservice
architecture https://en.wikipedia.org/wiki/Microservices for better
scalability and performance).

I am a cfml and javascript developer, and a Java neophyte, so I don’t
have a good understanding of the separation of the responsibilities of
Lucee and Tomcat under the hood. However, I do have a nice app running
on Railo which I am planning to port to Lucee (and onto Amazon’s
Elastic Beanstalk or EC2 Container platform). As part of this process,
I have been looking at wanting to setup the application for horizontal
scalability. So…

I have an associate who is very skilled with Docker and microservice
architecture and, working for Oracle, he has considerable experience
delivering very high traffic, mission-critical applications. With that
in mind, his initial reaction when I was explaining my stack to him
was that all components should be split into their own docker
containers, even down to the finely-grained layer of separating the
Lucee servlet and the Tomcat servlet container. This sounded
unnecessary (and perhaps impossible) to me, but as I said, I am not
very knowledgeable in this area.

So then, based on this discussion, it sounds to me like Lucee and
Tomcat should ALWAYS live together in the same
environment/server/vm/docker container (regardless of the scale of
your application), and only the web layer (apache or nginx) and db
should be split out on their own layers.

So it would be:

  • layer 1) web layer (apache or nginx serving as load balancer)
  • layer 2) app layer (multiple instances of lucee and tomcat
    together on each instance serving the application)
  • layer 3) db layer (MySQL serving db access).

Does this sound correct to you?

Thanks again,
Brian

On Tuesday, February 16, 2016 at 12:11:12 PM UTC-5, Harry Klein wrote:

Maybe he meant this kind of distributed environment?

http://blogs.coldfusion.com/post.cfm/setting-up-coldfusion-in-distributed-envionment
<http://blogs.coldfusion.com/post.cfm/setting-up-coldfusion-in-distributed-envionment>

-Harry

*Von:*lu...@googlegroups.com <javascript:>
[mailto:lu...@googlegroups.com <javascript:>] *Im Auftrag von
*Igal @ Lucee.org
*Gesendet:* Dienstag, 16. Februar 2016 18:08
*An:* lu...@googlegroups.com <javascript:>
*Betreff:* Re: [Lucee] scalable architecture for lucee app

oh, well.  that's a matter of how much resources he's got, and how
much traffic he gets.  if he has lots of both then sure -- put
them on separate machines, but in most cases that is not needed IMO.

Igal Sapir
Lucee Core Developer
Lucee.org <http://lucee.org/>

On 2/16/2016 9:03 AM, Mark Drew wrote:

    He means whether he should separate the web server
    (nginx/apache) and put it in a different machine/VM/Container
    than Tomcat.

    MD

        On 16 Feb 2016, at 16:54, Igal @ Lucee.org <http://lucee.org> <ig...@lucee.org <javascript:>> wrote:

        Lucee is a Java Servlet.  Java Servlets run inside Servlet
        Containers.  Tomcat is a Servlet Container.  Therefore --
        /Lucee runs inside Tomcat which runs inside a JVM/.

        Not sure what you want to separate...?

        Igal Sapir
        Lucee Core Developer
        Lucee.org <http://lucee.org/>

        On 2/16/2016 7:49 AM, Nando Breiter wrote:

                 Let me highlight the biggest question mark for me
                and see if I can prompt some further insight...
                have you ever run (or considered running) Tomcat
                and Lucee on separate containers (or vm's, or
                physical machines), or in your opinion should they
                always be run within the same environment?

            In my completely /naive/ opinion, they should always
            be run within the same environment ;-) Why would you
            want them in separate environments ( if it is possible
            ... )?

            By the way, regarding your question 3 about MySql, you
            could take a look at Google Cloud Sql ...
            https://cloud.google.com/sql/docs/introduction
            <https://cloud.google.com/sql/docs/introduction> ,
            which is a relatively painless way to achieve "data
            replication between multiple zones with automatic
            failover" when using MySql.

            -- 
            Love Lucee? Become a supporter and be part of the
            Lucee project today! -
            http://lucee.org/supporters/become-a-supporter.html
            <http://lucee.org/supporters/become-a-supporter.html>
            ---
            You received this message because you are subscribed
            to the Google Groups "Lucee" group.
            To unsubscribe from this group and stop receiving
            emails from it, send an email to
            lucee+un...@googlegroups.com <javascript:>.
            To post to this group, send email to
            lu...@googlegroups.com <javascript:>.
            To view this discussion on the web visit
            https://groups.google.com/d/msgid/lucee/CAGHrs%3D-Lq5NHvOnqNEnJAarQJJifJiFv74nH2GuFdXC6E2E1sw%40mail.gmail.com
            <https://groups.google.com/d/msgid/lucee/CAGHrs%3D-Lq5NHvOnqNEnJAarQJJifJiFv74nH2GuFdXC6E2E1sw%40mail.gmail.com>.
            For more options, visit
            https://groups.google.com/d/optout
            <https://groups.google.com/d/optout>.

        -- 
        Love Lucee? Become a supporter and be part of the Lucee
        project today! -
        http://lucee.org/supporters/become-a-supporter.html
        <http://lucee.org/supporters/become-a-supporter.html>
        ---
        You received this message because you are subscribed to
        the Google Groups "Lucee" group.
        To unsubscribe from this group and stop receiving emails
        from it, send an email to lucee+un...@googlegroups.com
        <javascript:>.
        To post to this group, send email to
        lu...@googlegroups.com <javascript:>.
        To view this discussion on the web visit
        https://groups.google.com/d/msgid/lucee/56C3545B.2020508%40lucee.org
        <https://groups.google.com/d/msgid/lucee/56C3545B.2020508%40lucee.org>.
        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.

    -- 
    Love Lucee? Become a supporter and be part of the Lucee
    project today! -
    http://lucee.org/supporters/become-a-supporter.html
    <http://lucee.org/supporters/become-a-supporter.html>
    ---
    You received this message because you are subscribed to the
    Google Groups "Lucee" group.
    To unsubscribe from this group and stop receiving emails from
    it, send an email to lucee+un...@googlegroups.com <javascript:>.
    To post to this group, send email to lu...@googlegroups.com
    <javascript:>.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/lucee/DAF0F09E-6623-4FA0-AAE9-F51A65BD93D7%40gmail.com
    <https://groups.google.com/d/msgid/lucee/DAF0F09E-6623-4FA0-AAE9-F51A65BD93D7%40gmail.com>.
    For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.

-- 
Love Lucee? Become a supporter and be part of the Lucee project
today! - http://lucee.org/supporters/become-a-supporter.html
<http://lucee.org/supporters/become-a-supporter.html>
---
You received this message because you are subscribed to the Google
Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/56C3577E.9010609%40lucee.org
<https://groups.google.com/d/msgid/lucee/56C3577E.9010609%40lucee.org?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.


Love Lucee? Become a supporter and be part of the Lucee project today!


You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/4673aa75-cdde-4f07-bb8f-f53fc462febc%40googlegroups.com
https://groups.google.com/d/msgid/lucee/4673aa75-cdde-4f07-bb8f-f53fc462febc%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Got it, thanks a lot Igal, Nando, Mark and Harry! Long live Lucee :)On Tuesday, February 16, 2016 at 1:02:35 PM UTC-5, Igal wrote:

it sounds to me like Lucee and Tomcat should ALWAYS live together in the
same environment/server/vm/docker container (regardless of the scale of
your application)

right, because as I wrote in the previous email – Lucee runs inside
Tomcat
. Tomcat, as a servlet container, provides APIs and
infrastructure to Lucee which enables it to work properly. while you
could, theoretically, separate the two, it would make no sense to do so as
many things will work differently than they should (some features will
probably not work at all), and everything will run much slower due to
latency involved with communicating between the two containers.

So it would be:

  • layer 1) web layer (apache or nginx serving as load balancer)
  • layer 2) app layer (multiple instances of lucee and tomcat together on
    each instance serving the application)
  • layer 3) db layer (MySQL serving db access).

that would work. if you feel a need, and can afford it, you might want to
add a load balancer as mentioned earlier in the thread, a firewall
appliance (can be the same appliance as the LB), cluster session management
if you use sessions, and database replication with failover in case the
primary fails.

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/
On 2/16/2016 9:44 AM, Brian FitzGerald wrote:

Hey guys,

I really appreciate you all chiming in; you’re awesome. Actually, I am NOT
talking about separating nginx (or apache) and lucee/tomcat, that I am
already reasonably sure I will end up doing. Igal was right to be confused
in that I am indeed talking about the possibility of separating Lucee
itself and Tomcat onto separate servers/docker containers (with the
intention of executing a microservice architecture
https://en.wikipedia.org/wiki/Microservices for better scalability and
performance).

I am a cfml and javascript developer, and a Java neophyte, so I don’t have
a good understanding of the separation of the responsibilities of Lucee and
Tomcat under the hood. However, I do have a nice app running on Railo which
I am planning to port to Lucee (and onto Amazon’s Elastic Beanstalk or EC2
Container platform). As part of this process, I have been looking at
wanting to setup the application for horizontal scalability. So…

I have an associate who is very skilled with Docker and microservice
architecture and, working for Oracle, he has considerable experience
delivering very high traffic, mission-critical applications. With that in
mind, his initial reaction when I was explaining my stack to him was that
all components should be split into their own docker containers, even down
to the finely-grained layer of separating the Lucee servlet and the Tomcat
servlet container. This sounded unnecessary (and perhaps impossible) to me,
but as I said, I am not very knowledgeable in this area.

So then, based on this discussion, it sounds to me like Lucee and Tomcat
should ALWAYS live together in the same environment/server/vm/docker
container (regardless of the scale of your application), and only the web
layer (apache or nginx) and db should be split out on their own layers.

So it would be:

  • layer 1) web layer (apache or nginx serving as load balancer)
  • layer 2) app layer (multiple instances of lucee and tomcat together on
    each instance serving the application)
  • layer 3) db layer (MySQL serving db access).

Does this sound correct to you?

Thanks again,
Brian

On Tuesday, February 16, 2016 at 12:11:12 PM UTC-5, Harry Klein wrote:

Maybe he meant this kind of distributed environment?

http://blogs.coldfusion.com/post.cfm/setting-up-coldfusion-in-distributed-envionment

-Harry

Von: lu...@googlegroups.com [mailto:lu...@googlegroups.com] *Im
Auftrag von *Igal @ Lucee.org
Gesendet: Dienstag, 16. Februar 2016 18:08
An: lu...@googlegroups.com
Betreff: Re: [Lucee] scalable architecture for lucee app

oh, well. that’s a matter of how much resources he’s got, and how much
traffic he gets. if he has lots of both then sure – put them on separate
machines, but in most cases that is not needed IMO.

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

On 2/16/2016 9:03 AM, Mark Drew wrote:

He means whether he should separate the web server (nginx/apache) and put
it in a different machine/VM/Container than Tomcat.

MD

On 16 Feb 2016, at 16:54, Igal @ Lucee.org http://lucee.org < ig...@lucee.org> wrote:

Lucee is a Java Servlet. Java Servlets run inside Servlet Containers.
Tomcat is a Servlet Container. Therefore – Lucee runs inside Tomcat
which runs inside a JVM
.

Not sure what you want to separate…?

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

On 2/16/2016 7:49 AM, Nando Breiter wrote:

Let me highlight the biggest question mark for me and see if I can
prompt some further insight… have you ever run (or considered running)
Tomcat and Lucee on separate containers (or vm’s, or physical machines), or
in your opinion should they always be run within the same environment?

In my completely naive opinion, they should always be run within the
same environment :wink: Why would you want them in separate environments ( if
it is possible … )?

By the way, regarding your question 3 about MySql, you could take a look
at Google Cloud Sql … https://cloud.google.com/sql/docs/introduction
https://cloud.google.com/sql/docs/introduction , which is a relatively
painless way to achieve “data replication between multiple zones with
automatic failover” when using MySql.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAGHrs%3D-Lq5NHvOnqNEnJAarQJJifJiFv74nH2GuFdXC6E2E1sw%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout
https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/56C3545B.2020508%40lucee.org
https://groups.google.com/d/msgid/lucee/56C3545B.2020508%40lucee.org.
For more options, visit https://groups.google.com/d/optout
https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/DAF0F09E-6623-4FA0-AAE9-F51A65BD93D7%40gmail.com
https://groups.google.com/d/
msgid/lucee/DAF0F09E-6623-4FA0-AAE9-F51A65BD93D7%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/56C3577E.9010609%40lucee.org?utm_medium=email&utm_source=footer
https://groups.google.com/d/msgid/lucee/56C3577E.9010609%40lucee.org.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/4673aa75-cdde-4f07-bb8f-f53fc462febc%40googlegroups.com?utm_medium=email&utm_source=footer
https://groups.google.com/d/msgid/lucee/4673aa75-cdde-4f07-bb8f-f53fc462febc%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.

oh, well. that’s a matter of how much resources he’s got, and how much
traffic he gets. if he has lots of both then sure – put them on
separate machines, but in most cases that is not needed IMO.

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 2/16/2016 9:03 AM, Mark Drew wrote:

He means whether he should separate the web server (nginx/apache) and
put it in a different machine/VM/Container than Tomcat.

MD

On 16 Feb 2016, at 16:54, Igal @ Lucee.org http://lucee.org <@Igal mailto:Igal> wrote:

Lucee is a Java Servlet. Java Servlets run inside Servlet
Containers. Tomcat is a Servlet Container. Therefore – /Lucee runs
inside Tomcat which runs inside a JVM/.

Not sure what you want to separate…?

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

On 2/16/2016 7:49 AM, Nando Breiter wrote:

 Let me highlight the biggest question mark for me and see if I
can prompt some further insight... have you ever run (or
considered running) Tomcat and Lucee on separate containers (or
vm's, or physical machines), or in your opinion should they
always be run within the same environment?

In my completely /naive/ opinion, they should always be run within
the same environment :wink: Why would you want them in separate
environments ( if it is possible … )?

By the way, regarding your question 3 about MySql, you could take a
look at Google Cloud Sql …
https://cloud.google.com/sql/docs/introduction , which is a
relatively painless way to achieve “data replication between
multiple zones with automatic failover” when using MySql.


Love Lucee? Become a supporter and be part of the Lucee project
today! - http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to lucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAGHrs%3D-Lq5NHvOnqNEnJAarQJJifJiFv74nH2GuFdXC6E2E1sw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project
today! - http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to lucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/56C3545B.2020508%40lucee.org
https://groups.google.com/d/msgid/lucee/56C3545B.2020508%40lucee.org?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today!


You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/DAF0F09E-6623-4FA0-AAE9-F51A65BD93D7%40gmail.com
https://groups.google.com/d/msgid/lucee/DAF0F09E-6623-4FA0-AAE9-F51A65BD93D7%40gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Hey guys,

I really appreciate you all chiming in; you’re awesome. Actually, I am NOT
talking about separating nginx (or apache) and lucee/tomcat, that I am
already reasonably sure I will end up doing. Igal was right to be confused
in that I am indeed talking about the possibility of separating Lucee
itself and Tomcat onto separate servers/docker containers (with the
intention of executing a microservice architecture
https://en.wikipedia.org/wiki/Microservices for better scalability and
performance).

I am a cfml and javascript developer, and a Java neophyte, so I don’t have
a good understanding of the separation of the responsibilities of Lucee and
Tomcat under the hood. However, I do have a nice app running on Railo which
I am planning to port to Lucee (and onto Amazon’s Elastic Beanstalk or EC2
Container platform). As part of this process, I have been looking at
wanting to setup the application for horizontal scalability. So…

I have an associate who is very skilled with Docker and microservice
architecture and, working for Oracle, he has considerable experience
delivering very high traffic, mission-critical applications. With that in
mind, his initial reaction when I was explaining my stack to him was that
all components should be split into their own docker containers, even down
to the finely-grained layer of separating the Lucee servlet and the Tomcat
servlet container. This sounded unnecessary (and perhaps impossible) to me,
but as I said, I am not very knowledgeable in this area.

So then, based on this discussion, it sounds to me like Lucee and Tomcat
should ALWAYS live together in the same environment/server/vm/docker
container (regardless of the scale of your application), and only the web
layer (apache or nginx) and db should be split out on their own layers.

So it would be:

  • layer 1) web layer (apache or nginx serving as load balancer)
  • layer 2) app layer (multiple instances of lucee and tomcat together on
    each instance serving the application)
  • layer 3) db layer (MySQL serving db access).

Does this sound correct to you?

Thanks again,
BrianOn Tuesday, February 16, 2016 at 12:11:12 PM UTC-5, Harry Klein wrote:

Maybe he meant this kind of distributed environment?

http://blogs.coldfusion.com/post.cfm/setting-up-coldfusion-in-distributed-envionment

-Harry

Von: lu...@googlegroups.com <javascript:> [mailto:lu...@googlegroups.com
<javascript:>] *Im Auftrag von *Igal @ Lucee.org
Gesendet: Dienstag, 16. Februar 2016 18:08
An: lu...@googlegroups.com <javascript:>
Betreff: Re: [Lucee] scalable architecture for lucee app

oh, well. that’s a matter of how much resources he’s got, and how much
traffic he gets. if he has lots of both then sure – put them on separate
machines, but in most cases that is not needed IMO.

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

On 2/16/2016 9:03 AM, Mark Drew wrote:

He means whether he should separate the web server (nginx/apache) and put
it in a different machine/VM/Container than Tomcat.

MD

On 16 Feb 2016, at 16:54, Igal @ Lucee.org http://lucee.org < ig...@lucee.org <javascript:>> wrote:

Lucee is a Java Servlet. Java Servlets run inside Servlet Containers.
Tomcat is a Servlet Container. Therefore – Lucee runs inside Tomcat
which runs inside a JVM
.

Not sure what you want to separate…?

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

On 2/16/2016 7:49 AM, Nando Breiter wrote:

Let me highlight the biggest question mark for me and see if I can prompt
some further insight… have you ever run (or considered running) Tomcat
and Lucee on separate containers (or vm’s, or physical machines), or in
your opinion should they always be run within the same environment?

In my completely naive opinion, they should always be run within the
same environment :wink: Why would you want them in separate environments ( if
it is possible … )?

By the way, regarding your question 3 about MySql, you could take a look
at Google Cloud Sql … https://cloud.google.com/sql/docs/introduction ,
which is a relatively painless way to achieve “data replication between
multiple zones with automatic failover” when using MySql.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAGHrs%3D-Lq5NHvOnqNEnJAarQJJifJiFv74nH2GuFdXC6E2E1sw%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/56C3545B.2020508%40lucee.org.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/DAF0F09E-6623-4FA0-AAE9-F51A65BD93D7%40gmail.com
.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/56C3577E.9010609%40lucee.org
https://groups.google.com/d/msgid/lucee/56C3577E.9010609%40lucee.org?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Thank you Nando! Your insight is always very much appreciated. I will need
to read-up on DNS failovers, but I see what you mean about the load
balancer being the most vulnerable link. I appreciate you giving me a heads
up on that.

Regarding all those other questions, I realize I’m asking a lot - probably
too much. Let me highlight the biggest question mark for me and see if I
can prompt some further insight… have you ever run (or considered
running) Tomcat and Lucee on separate containers (or vm’s, or physical
machines), or in your opinion should they always be run within the same
environment?

Best,
BrianOn Monday, February 15, 2016 at 5:48:07 PM UTC-5, Nando Breiter wrote:

I don’t have “the” answer, but having experienced the recent sustained
DDoS attack on Linode, “scalable” should ideally avoid a single point of
failure. It’s dead easy to setup Nginx for load balancing, but unless you
incorporate robust DNS failover into the mix, your load balancer is
going to be the most vulnerable link.

I also looked into CloudFlare and Fastly during the attack - perhaps a
CDN might be worthwhile to consider.

Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamedia

On Mon, Feb 15, 2016 at 10:51 PM, Brian FitzGerald <bmfitz...@gmail.com <javascript:>> wrote:

Hey guys,

My app is currently running on Railo and I would like move it to Lucee.
In doing so, I am also getting into Docker and exploring setting up my
Lucee application to run on Amazon’s EC2 container service or on
DigitalOcean. I have some high level questions for anyone who has any
experience running a Lucee app in containers, or at least has a better
understanding of how Lucee works than I do (so in that case, pretty much
all of you haha). My goal is to get away from my current single VPS server
approach (in production) and have a horizontally scalable architecture for
my application.

  1. Would it make sense to have Apache or Nginx serve as the load balancer
    (routing request to one of many “Lucee” containers/boxes)? I’m thinking
    yes, but I’m not experienced in this area.
  2. Would it ever make sense to have Lucee and Tomcat running on different
    containers or boxes from each other? My understanding of “proper”
    containerization is that having each service broken onto it’s own container
    is the correct approach. It seems odd to me to have Tomcat and Lucee on
    different containers, but I’m not experienced in this area either. Thoughts?
  3. Assuming you wanted to support lots of concurrent users, would it be
    reasonable to have all your Lucee/Tomcat instances talking to a single db
    layer/container in MySQL, or would another approach be recommended?

Thanks for your insight,
Brian


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/30035782-e66f-4451-8c04-8bcde2959421%40googlegroups.com
https://groups.google.com/d/msgid/lucee/30035782-e66f-4451-8c04-8bcde2959421%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Lucee is a Java Servlet. Java Servlets run inside Servlet Containers.
Tomcat is a Servlet Container. Therefore – /Lucee runs inside Tomcat
which runs inside a JVM/.

Not sure what you want to separate…?

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 2/16/2016 7:49 AM, Nando Breiter wrote:

 Let me highlight the biggest question mark for me and see if I
can prompt some further insight... have you ever run (or
considered running) Tomcat and Lucee on separate containers (or
vm's, or physical machines), or in your opinion should they always
be run within the same environment?

In my completely /naive/ opinion, they should always be run within the
same environment :wink: Why would you want them in separate environments
( if it is possible … )?

By the way, regarding your question 3 about MySql, you could take a
look at Google Cloud Sql …
https://cloud.google.com/sql/docs/introduction , which is a relatively
painless way to achieve “data replication between multiple zones with
automatic failover” when using MySql.


Love Lucee? Become a supporter and be part of the Lucee project today!


You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAGHrs%3D-Lq5NHvOnqNEnJAarQJJifJiFv74nH2GuFdXC6E2E1sw%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAGHrs%3D-Lq5NHvOnqNEnJAarQJJifJiFv74nH2GuFdXC6E2E1sw%40mail.gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

He means whether he should separate the web server (nginx/apache) and put it in a different machine/VM/Container than Tomcat.

MD> On 16 Feb 2016, at 16:54, Igal @ Lucee.org <@Igal> wrote:

Lucee is a Java Servlet. Java Servlets run inside Servlet Containers. Tomcat is a Servlet Container. Therefore – Lucee runs inside Tomcat which runs inside a JVM.

Not sure what you want to separate…?

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/
On 2/16/2016 7:49 AM, Nando Breiter wrote:

Let me highlight the biggest question mark for me and see if I can prompt some further insight… have you ever run (or considered running) Tomcat and Lucee on separate containers (or vm’s, or physical machines), or in your opinion should they always be run within the same environment?

In my completely naive opinion, they should always be run within the same environment :wink: Why would you want them in separate environments ( if it is possible … )?

By the way, regarding your question 3 about MySql, you could take a look at Google Cloud Sql … https://cloud.google.com/sql/docs/introductionhttps://cloud.google.com/sql/docs/introduction https://cloud.google.com/sql/docs/introduction , which is a relatively painless way to achieve “data replication between multiple zones with automatic failover” when using MySql.


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAGHrs%3D-Lq5NHvOnqNEnJAarQJJifJiFv74nH2GuFdXC6E2E1sw%40mail.gmail.com?utm_medium=email&utm_source=footerhttps://groups.google.com/d/msgid/lucee/CAGHrs%3D-Lq5NHvOnqNEnJAarQJJifJiFv74nH2GuFdXC6E2E1sw%40mail.gmail.com https://groups.google.com/d/msgid/lucee/CAGHrs%3D-Lq5NHvOnqNEnJAarQJJifJiFv74nH2GuFdXC6E2E1sw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/56C3545B.2020508%40lucee.org https://groups.google.com/d/msgid/lucee/56C3545B.2020508%40lucee.org?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.