hydra-express | wraps Hydra and ExpressJS into a library for building | Microservice library
kandi X-RAY | hydra-express Summary
kandi X-RAY | hydra-express Summary
Hydra-Express is a light-weight library for building NodeJS and ExpressJS based distributed computing applications. It was announced at EmpireNode 2016. Hydra offers features such as service discovery, distributed messaging, message load balancing, logging, presence, and health monitoring. Using Hapi, Koa, Sails.js, Restify or Restana then checkout the Hydra Integration Project.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hydra-express
hydra-express Key Features
hydra-express Examples and Code Snippets
Community Discussions
Trending Discussions on hydra-express
QUESTION
I am trying to use Hydra-CLI on a node.js local system, while connecting to a redis db that is hosted on redislabs. Howver, the redislabs db requires a password and I can't seem to find any configuration for password in the Hydra-CLI configuration options.
I can connect to the database using hydra-express with a password set in the config.json hydra object.
...ANSWER
Answered 2018-Aug-22 at 09:19Updating with solution:
So I ended just cloning the github project of hydra-cli after going through their code. There's simply no password set in the configuration, thus there's no way to solve it without changing some code.
I have made the adjustments needed and sent a pull-request. Now the prompt asks the user for an option password and can connect to a password protected redis database.
If you see this and need the solution asap i here is a link to my branch of the code so you can copy it until the request is approved and the hydra-cli npm is updated.
https://github.com/aviyacohen/hydra-cli
You will need to find the hydra-cli.js
file on your local system (as it is installed globally) and just copy paste my code into it instead of the one there now. The changes are minor you can compare files first if you want to check out what i did, it was just adding a couple of lines to incorporate a password in the redis data.
QUESTION
I started a project and I started to have a lot of web traffic, and at some point I felt insecure of how to scale the project to production in two issues:
- How to perform updates without leaving my users without service?
- How to correctly configure Node.js so that it consumes less memory?
I have microservices working with Hydra-express, and I have not been able to implement Hydra-router and I do it with Express.js; I also have NGINX as a proxy gateway.
I am programming in ES6, transpiling with BABEL and maintaining active microservices with PM2, some with fork and the most important in cluster mode.
I was thinking about using docker, but I have not found any tutorial on how to use it with CDN, upload files and serve them to the user.
...ANSWER
Answered 2018-Mar-14 at 02:12It's impossible to give a definite answer to 2 since that is completely up to what the application does, there's no silver bullet configuration that you can apply.
This leaves the first point, which is around something called zero downtime.
So, in the context of having multiple servers returning content to users, e.g. http servers I guess it's fair to say that most production environments have something at the front that's not related to the business logic. This could be a load balancer (comes in many shapes and forms) or a reverse proxy. This is usually the spot where you point your DNS A record. This server should basically never be down.
Now, lets assume you have changed some business logic and want to deploy a new backend. What you normally do is to swap out the already running processes behind the load balancer (or reverse proxy), one by one. So if you have five node processes, you stop one, start up a new with the updated code, and repeat until all running have been swapped out.
You can also utilize this to swap out just one, run tests on that one, then proceed to swap out the rest.
To really make sure you don't disrupt any users, you should stop accepting new http requests on the old processes, so new http requests are routed to the updated processes. This will allow for http requests that are taking place to finish up. Then you stop the old processes.
Hopes this helps.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install hydra-express
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page