Showing results for 
Search instead for 
Did you mean: 

Dedicated instances in CAP project

0 Kudos

We have a CAP project in cloud foundry with multiple srv BTP instances in order to have better performances.
When we develop specific actions in service.js ( node.js to manage events), is it possible to have the code executed on some instances only ?

We would like to have instances dedicated to manage events from S4 and other to manage GUI of the application.

I could create a dedicated application to manage events to do that but could also be great to manage everything that concern one application in the same application.


View Entire Topic
0 Kudos

I do this by deploying same CAP project as multiple CF apps.

Apps are the unit for resource scaling in Cloud foundry. But one is not restricted in deploying one CAP project (or any other application package) in one CF app. If you deploy multiple apps with the same application package they are indistinguishable (mostly) from multiple instances of the same app if one were to bind the same services. But, now one gets to scale these deployments individually.

When starting CAP server (node.js) you can configure which services are started. It is straight forward to start only one service with a command line argument.  

Even though it is normal to route hosts to apps, CF routes also allow to route path to apps. 

You can create one mtar file with multiple CF apps using the same package, so that the mtar file size does not explode. 

See: How to scale a microservice by deploying it in multiple apps.