cancel
Showing results for 
Search instead for 
Did you mean: 

Dedicated instances in CAP project

David_B
Explorer
0 Kudos

Hi,
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.

Regards

View Entire Topic
GrahamNewport
Explorer

If you are talking about app scale out

As far as I am aware, running multiple app copies, you have little control over. CF deals with even distribution and you do not even know which AZ they run in. They are replicated copies also, so making them different?

WRT your comment "be great to manage everything that concern one application in the same application." I would challenge that concept in a distributed environment like BTP. After all, scaling out apps  provides stability as well as performance.

I may have misread your question though.

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @David_B , Hi @GrahamNewport,

I totally agree with the assessment made by Graham. Microservices shall adhere to the 12-factor principles.

Read more on the microservice principles about "12-factor-app":

https://12factor.net/concurrency:

More specifically on your case:

"The process model truly shines when it comes time to scale out. The share-nothing, horizontally partitionable nature of twelve-factor app processes means that adding more concurrency is a simple and reliable operation. The array of process types and number of processes of each type is known as the process formation.".

I would rely on newer Virtual Threading in Java (if your microservice is created using that language) to increase the amount of parallel work seamlessly.

Otherwise, let the platform handle the workload as it is supposed to. 

On the other hand it might make some sense to have your service behave in a similar manner as the ones you develop for the on-prem world. 
On such cases, I would recommend developing them on Kyma and having such control delegation via NGINX.

Best regards,
Ivan