Camunda External Task Latency

I’m currently facing some latency challenges in a reasonably straight forward BPMN flow. I’ve following service tasks in my flow:

  1. Order & Order canceled (Java)
  2. Payment (Node JS external service)

In case of any error in the payment service I trigger a compensation flow to cancel the order (and other related business logic). Here’s a breakdown of phase wise latency that I’ve currently observed over multiple runs (mean almost same as median numbers):

  1. Start of the process → order service: ~900ms - 1 sec
  2. Order service → external payment service (where I’m simulating an error every time): 7-8 sec
  3. External payment service → cancel order (through compensating boundary event): 4-5 sec
  4. Cancel order → end event listener: <1 sec

Both the order and payment services currently are more or less “pass through” services with only info logs being printed to the console. I’ve tried playing around with asyncresponsetimeout, maxtasks and backoff strategy but nothing has really made any difference to the 12-13 seconds processing time (#2 + #3 above).

Wanted to check if this is on expected lines? Or am I missing something basic?