Cluster mode in nodejs using PM2 [closed] - node.js

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
We are planning to use kubernetes to deploy node application in a AWS clustered environment. Just needed some advice about if its good practice to use nodejs clustered module for a distributed deployment in AWS. Or single process for single container is good in AWS.

It's really not about "good" or "bad".
Using PM2 would mean you'd ask Kubernetes for multiple CPUs for your pod.
Not using PM2 would means you'd ask Kubernetes for one (or less) CPU for your pod, which would be easier for Kubernetes to schedule (possibly on multiple nodes).
Having one fat pod on one node is less reliable than having multiple smaller pods distributed across multiple nodes.
Hope this helps!

Related

For a small production environment is it better to use only masters k8s or some mini k8s solutions? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 days ago.
Improve this question
I have a scenario of a small air-gap production environment with only three Linux servers (CentOS or RHEL).
I want to deploy a small k8s cluster on them.
I have two approaches for now:
Installing a pure k8s cluster with only master nodes and untainting them from NoSchedule to run all pods on them.
Installing a mini cluster solution using k3s, k0s, or microk8s and configuring all nodes as master and workers
If I use the first approach (I know it's a bad practice) is it the correct way to run pods on masters?
If I want to use the second one who is the best and easiest to install in different air-gap environments and maintain them? (I used k8s and okd 3 in production but not them)
Lastly, what do you think is the best approach from those two, or are there better ones for my scenario?
Thanks in advance for the help

Nginx multiple load balancers or single load blanacer [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
When deploying an application with multiple tiers is it preferable have individual Nginx load-balancers for API and Web servers? Or a single LB serving both the API and Web servers?
I would go with the simpler solution of a single load balancer until it's clear that they need be separate.
If Nginx is the load balancer, you can use different logging and configurations to customize differences between the "web" backend and the "api" backend.
So there is a lot to consider when node balancing, with node I personally use pm2 in cluster mode (for machine local clusters) and nigix as the overall load balancer (and static host).
Remember when load balancing, depending on the app, sessions and communication between the nodes requires infrastructure (redis, mongodb)
pm2 (locally) can deploy a node app to each cpu core and manage load balancing all in one command pm2 start app.js -i 4 this can be spread across multiple nodes.

Big Data integration testing best practice [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I am looking around for some resources on what best practices are for a AWS based data ingestion pipeline that is using Kafka, storm, spark (streaming and batch) which read from and write to Hbase using various micro services to expose the data layer. For my local env I am thinking of creating either docker or vagrant images that will allow me to interact with the env. My issue becomes as to how to standup something for a functional end to end environment which is closer to prod, the drop dead way would be to have an always on environment but that gets expensive. Along the same lines in terms of a perf environment it seems like I might have to punt and have service accounts that can have the 'run of the world' but other accounts that will be limited via compute resources so they don't overwhelm the cluster.
I am curious how others have handled the same problem and if I am thinking of this backwards.
AWS also provides a Docker Service via EC2 Containers. If your local deployment using Docker images is successful, you can check out AWS EC2 Container Service (https://aws.amazon.com/ecs/).
Also, check out storm-docker (https://github.com/wurstmeister/storm-docker), provides easy to use docker-files for deploying storm clusters.
Try hadoop mini clusters. It has support for most of the tools you are using.
Mini Cluster

Spark,Akka,Storm Or RxJava [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have a use case where I get 10K to 15 K Messages/sec and it might be less than 5K also sometime and I push those into RabbitMQ now those messages I should parse,run some RE on that and do some sort aggregation and run some statistics. My product(the data pipeline) would be deployed in single machine as there are some business constrain. Have explored Spark Akka Storm and RxJava, Could you suggest me what to be used. But I don't want to do in plain Java, as by this way I have to handle all the threading etc.
Based on my experience I would go for Akka. You can create different pools of actors to perform some tasks concurrently on different messages. Also you can leverage the power of akka-camel to have a RabbitMQ consumer using the RabbitMQ Camel Component.
You might be able to do the same with Storm but I don't have that much experience with it to recommend it personally.
I wouldn't go for Apache Spark since you would need to user Apache Spark Streaming and you will need to learn about how to configure the buffering window correctly for your use case.

Azure memory size -- what gives? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
OK,
I am setting up my first Azure VM, the only images available are basically windows server.
Why are their servers so low on memory until you get to pretty big $$$?
Are there any of us who would straight faced tell a client that they should run a windows server with .75 GB of ram?
Can I run basic applications on the small machines or should I not waste my time?
Thank you,
Joe
not sure where you're looking at, but there's definitely more than Windows images in there (Ubunto, CoreOs, CentOS, Suse...)
Not to mention that you also have the VM Depot
extra small instances make good for some light load like acting as a witness in HA setups, or even running small web sites...
depends on what you run on it.
you'd know better what your app requires.

Resources