The reactive programming model is a much better approach than the traditional asynchronous callback approach that is often used for building an API gateway application. Here, we can use Java 8's CompletableFuture Scala's, Future, ReactiveX, Netflix's RxJava for the JVM, Spring Reactor, and many more.
https://www.nginx.com/blog/building-microservices-using-an-api-gateway/