# Orchestrate microservices

**URL:** <https://discourse.nodered.org/t/orchestrate-microservices/29777>\
**Category:** General\
**Created:** [9 July 2020 10:35 UTC](https://discourse.nodered.org/t/orchestrate-microservices/29777 "2020-07-09T10:35:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisandro](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@lisandro](https://discourse.nodered.org/u/lisandro)\
**Post date:** [9 July 2020 10:35 UTC](https://discourse.nodered.org/t/orchestrate-microservices/29777/1 "2020-07-09T10:35:19Z")

</div>

Hello,

I am analyzing some tools in order to orchestrate some microservices, so as to guarantee a synchronous process between all of them. Does node-red work for this purpose?

Kind regards

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2020 10:40 UTC](https://discourse.nodered.org/t/orchestrate-microservices/29777/2 "2020-07-09T10:40:32Z")

</div>

Depends how you communicate to these microservices.

node-red can talk many protocols on many mediums.

Perhaps you you provide a bit more info we can advise?

Are you meaning node-red would communicate to these services via REST apis? UDP? TCP? Serial? MQTT?

PS all of this ⬆ is possible & common place in node-red.

> [@lisandro](#):
>
> so as to guarantee a synchronous process

What is meant by "guarantee a synchronous process" - you can certainly ensure services are avaiable but ensuring synchronous process? Please explain what you are hoping to achieve.

---

<div class="post-metadata">

**Author:** ![lisandro](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@lisandro](https://discourse.nodered.org/u/lisandro)\
**Post date:** [9 July 2020 11:02 UTC](https://discourse.nodered.org/t/orchestrate-microservices/29777/3 "2020-07-09T11:02:26Z")

</div>

> [@Steve-Mcl](#):
>
> re you meaning node-red would communicate to these services via REST apis? UDP? TCP? Serial

Thanks for answering. The communication would be via REST APIs. With "guarantee a synchronous process" I meant to call a microservice, wait for its response and depending on it, decide the action to take.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2020 11:38 UTC](https://discourse.nodered.org/t/orchestrate-microservices/29777/4 "2020-07-09T11:38:57Z")

</div>

Then, yes, all day long every day. This is all built into core.

The built in `http request` node can GET/POST/WHATEVER\_YOU\_DECIDE (plus headers if needed) to a REST interface & return the data (JSON / String / Buffer / whatever). From there depending on your criteria you might want to perform processing based on the `statusCode` or the `data` returned.

NOTE: The http requests are async by design (to prevent blocking) BUT as a node-red flow wont process the next item until the http request is resolved and returned - to all intents and purposes - appears to be synchronous.

There are far more possibilities that I am able to describe.

There are contrib nodes (like state machines, CRON, PLC Drivers) than can further automate things.

For example, I have one instance authenticates against users in a CouchDB, retrieves a cookie/token then performs POSTs/GETs etc against the DB using the cookie/token - all via HTTP

See [here](https://cookbook.nodered.org/http/) for a bit more info related to HTTP capabilities (note, this is only scratching the surface)

See this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). It is by the developers of node-red. They're nice & short and to the point. You should get a good feel for node-red in about 1hr.

---

<div class="post-metadata">

**Author:** ![lisandro](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@lisandro](https://discourse.nodered.org/u/lisandro)\
**Post date:** [9 July 2020 11:45 UTC](https://discourse.nodered.org/t/orchestrate-microservices/29777/5 "2020-07-09T11:45:14Z")

</div>

> [@Steve-Mcl](#):
>
> See this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). It is by the developers of node-red. They're nice & short and to the point. You should get a good feel for node-red in about 1hr.

Thank you very much for the info

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 September 2020 11:45 UTC](https://discourse.nodered.org/t/orchestrate-microservices/29777/6 "2020-09-07T11:45:22Z")

</div>

Closed on 7 September 2020 11:45 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
