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

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현