Clustering in Node vs DockerNode.js Best Practice Exception HandlingHow is Docker different from a virtual machine?Should I use Vagrant or Docker for creating an isolated environment?How to list containers in DockerHow to get a Docker container's IP address from the host?How to remove old Docker containersHow to deal with persistent storage (e.g. databases) in DockerCopying files from Docker container to hostCopying files from host to Docker containerHow to copy Docker images from one host to another without using a repository

Why is Chromosome 1 called Chromosome 1?

Did Captain America make out with his niece?

What is an air conditioner compressor hard start kit and how does it work?

Can I enter a rental property without giving notice if I'm afraid a tenant may be hurt?

What could prevent players from leaving an island?

If someone else uploads my GPL'd code to Github without my permission, is that a copyright violation?

I was contacted by a private bank overseas to get my inheritance

Did WWII Japanese soldiers engage in cannibalism of their enemies?

Which genus do I use for neutral expressions in German?

Is Network I/O included in the timings for "RPC complete" seen in SQL Profiler?

What does VB stand for?

Can ads on a page read my password?

Is DC heating faster than AC heating?

"In charge of" vs "Responsible for"

How easy is it to get a gun illegally in the United States?

Does the length of a password for Wi-Fi affect speed?

Does a 4 bladed prop have almost twice the thrust of a 2 bladed prop?

Did silent film actors actually say their lines or did they simply improvise “dialogue” while being filmed?

Are certificates without DNS fundamentally flawed?

Secure my password from unsafe servers

What is the German idiom or expression for when someone is being hypocritical against their own teachings?

How many years before enough atoms of your body are replaced to survive the sudden disappearance of the original body’s atoms?

is it possible to terraform a planet made of human excrement into habitable planet?

Print only the last three columns from file



Clustering in Node vs Docker


Node.js Best Practice Exception HandlingHow is Docker different from a virtual machine?Should I use Vagrant or Docker for creating an isolated environment?How to list containers in DockerHow to get a Docker container's IP address from the host?How to remove old Docker containersHow to deal with persistent storage (e.g. databases) in DockerCopying files from Docker container to hostCopying files from host to Docker containerHow to copy Docker images from one host to another without using a repository






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I want to scale out my Node application with clustering.



I have a Node application that is containerized in Docker. In Node, I can fork child processes to parallelize the application at the thread level, or I can create parallel containers with Kubernetes or Docker Swarm.



What are the tradeoffs here?



This is an encryption server that will accept a file upload, encrypt it, and send it on its way.










share|improve this question
























  • Have you used Express aswell?

    – Thanveer Shah
    Mar 27 at 5:17











  • Depends on how many cores you have in the system and the cores allocated to your container. Forking in the child process seems like the easier way, less overhead (require less RAM..etc) to process stuff. Parallel containers with k8..etc provides you with management dashboard ..etc. But require more resources to operate and can be slower in processing as new containers need to be spin up to do parallel processing compare to forking.

    – Marcia Ong
    Mar 27 at 5:59











  • @ThanveerShah yup. Express is used in this application.

    – Shruggie
    Mar 27 at 9:40

















1















I want to scale out my Node application with clustering.



I have a Node application that is containerized in Docker. In Node, I can fork child processes to parallelize the application at the thread level, or I can create parallel containers with Kubernetes or Docker Swarm.



What are the tradeoffs here?



This is an encryption server that will accept a file upload, encrypt it, and send it on its way.










share|improve this question
























  • Have you used Express aswell?

    – Thanveer Shah
    Mar 27 at 5:17











  • Depends on how many cores you have in the system and the cores allocated to your container. Forking in the child process seems like the easier way, less overhead (require less RAM..etc) to process stuff. Parallel containers with k8..etc provides you with management dashboard ..etc. But require more resources to operate and can be slower in processing as new containers need to be spin up to do parallel processing compare to forking.

    – Marcia Ong
    Mar 27 at 5:59











  • @ThanveerShah yup. Express is used in this application.

    – Shruggie
    Mar 27 at 9:40













1












1








1








I want to scale out my Node application with clustering.



I have a Node application that is containerized in Docker. In Node, I can fork child processes to parallelize the application at the thread level, or I can create parallel containers with Kubernetes or Docker Swarm.



What are the tradeoffs here?



This is an encryption server that will accept a file upload, encrypt it, and send it on its way.










share|improve this question














I want to scale out my Node application with clustering.



I have a Node application that is containerized in Docker. In Node, I can fork child processes to parallelize the application at the thread level, or I can create parallel containers with Kubernetes or Docker Swarm.



What are the tradeoffs here?



This is an encryption server that will accept a file upload, encrypt it, and send it on its way.







node.js docker cluster-computing hardware






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 27 at 5:00









ShruggieShruggie

4072 silver badges15 bronze badges




4072 silver badges15 bronze badges















  • Have you used Express aswell?

    – Thanveer Shah
    Mar 27 at 5:17











  • Depends on how many cores you have in the system and the cores allocated to your container. Forking in the child process seems like the easier way, less overhead (require less RAM..etc) to process stuff. Parallel containers with k8..etc provides you with management dashboard ..etc. But require more resources to operate and can be slower in processing as new containers need to be spin up to do parallel processing compare to forking.

    – Marcia Ong
    Mar 27 at 5:59











  • @ThanveerShah yup. Express is used in this application.

    – Shruggie
    Mar 27 at 9:40

















  • Have you used Express aswell?

    – Thanveer Shah
    Mar 27 at 5:17











  • Depends on how many cores you have in the system and the cores allocated to your container. Forking in the child process seems like the easier way, less overhead (require less RAM..etc) to process stuff. Parallel containers with k8..etc provides you with management dashboard ..etc. But require more resources to operate and can be slower in processing as new containers need to be spin up to do parallel processing compare to forking.

    – Marcia Ong
    Mar 27 at 5:59











  • @ThanveerShah yup. Express is used in this application.

    – Shruggie
    Mar 27 at 9:40
















Have you used Express aswell?

– Thanveer Shah
Mar 27 at 5:17





Have you used Express aswell?

– Thanveer Shah
Mar 27 at 5:17













Depends on how many cores you have in the system and the cores allocated to your container. Forking in the child process seems like the easier way, less overhead (require less RAM..etc) to process stuff. Parallel containers with k8..etc provides you with management dashboard ..etc. But require more resources to operate and can be slower in processing as new containers need to be spin up to do parallel processing compare to forking.

– Marcia Ong
Mar 27 at 5:59





Depends on how many cores you have in the system and the cores allocated to your container. Forking in the child process seems like the easier way, less overhead (require less RAM..etc) to process stuff. Parallel containers with k8..etc provides you with management dashboard ..etc. But require more resources to operate and can be slower in processing as new containers need to be spin up to do parallel processing compare to forking.

– Marcia Ong
Mar 27 at 5:59













@ThanveerShah yup. Express is used in this application.

– Shruggie
Mar 27 at 9:40





@ThanveerShah yup. Express is used in this application.

– Shruggie
Mar 27 at 9:40












1 Answer
1






active

oldest

votes


















0














enter image description here



I found this picture in https://sites.google.com/site/mytechnicalcollection/cloud-computing/docker/container-vs-process . The author has some more comments on this subject. VMs vs Containers vs Processes.



I try to summarize



A. containers advantages:



  1. swarm/kubernetes is an excellent scheduler. To run in multi hosts or anywhere within docker.


  2. security and limitations. container has many features which is similar to a VM. But it is faster and simpler than VM in many aspects.


B. process fork advantages:



  1. lighter than container.

Last but not the least, you can run fork processes inside a container.
You can run only one container per host, and the process inside the container forks depends on the number of its host cores. That would be perfect for you.






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55370095%2fclustering-in-node-vs-docker%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    enter image description here



    I found this picture in https://sites.google.com/site/mytechnicalcollection/cloud-computing/docker/container-vs-process . The author has some more comments on this subject. VMs vs Containers vs Processes.



    I try to summarize



    A. containers advantages:



    1. swarm/kubernetes is an excellent scheduler. To run in multi hosts or anywhere within docker.


    2. security and limitations. container has many features which is similar to a VM. But it is faster and simpler than VM in many aspects.


    B. process fork advantages:



    1. lighter than container.

    Last but not the least, you can run fork processes inside a container.
    You can run only one container per host, and the process inside the container forks depends on the number of its host cores. That would be perfect for you.






    share|improve this answer





























      0














      enter image description here



      I found this picture in https://sites.google.com/site/mytechnicalcollection/cloud-computing/docker/container-vs-process . The author has some more comments on this subject. VMs vs Containers vs Processes.



      I try to summarize



      A. containers advantages:



      1. swarm/kubernetes is an excellent scheduler. To run in multi hosts or anywhere within docker.


      2. security and limitations. container has many features which is similar to a VM. But it is faster and simpler than VM in many aspects.


      B. process fork advantages:



      1. lighter than container.

      Last but not the least, you can run fork processes inside a container.
      You can run only one container per host, and the process inside the container forks depends on the number of its host cores. That would be perfect for you.






      share|improve this answer



























        0












        0








        0







        enter image description here



        I found this picture in https://sites.google.com/site/mytechnicalcollection/cloud-computing/docker/container-vs-process . The author has some more comments on this subject. VMs vs Containers vs Processes.



        I try to summarize



        A. containers advantages:



        1. swarm/kubernetes is an excellent scheduler. To run in multi hosts or anywhere within docker.


        2. security and limitations. container has many features which is similar to a VM. But it is faster and simpler than VM in many aspects.


        B. process fork advantages:



        1. lighter than container.

        Last but not the least, you can run fork processes inside a container.
        You can run only one container per host, and the process inside the container forks depends on the number of its host cores. That would be perfect for you.






        share|improve this answer













        enter image description here



        I found this picture in https://sites.google.com/site/mytechnicalcollection/cloud-computing/docker/container-vs-process . The author has some more comments on this subject. VMs vs Containers vs Processes.



        I try to summarize



        A. containers advantages:



        1. swarm/kubernetes is an excellent scheduler. To run in multi hosts or anywhere within docker.


        2. security and limitations. container has many features which is similar to a VM. But it is faster and simpler than VM in many aspects.


        B. process fork advantages:



        1. lighter than container.

        Last but not the least, you can run fork processes inside a container.
        You can run only one container per host, and the process inside the container forks depends on the number of its host cores. That would be perfect for you.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 13:41









        paco alcacerpaco alcacer

        1189 bronze badges




        1189 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55370095%2fclustering-in-node-vs-docker%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript