tzulitai commented on a change in pull request #30: [FLINK-16226] Add 
Backpressure to HttpFunction
URL: https://github.com/apache/flink-statefun/pull/30#discussion_r382902451
 
 

 ##########
 File path: 
statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/jsonmodule/Pointers.java
 ##########
 @@ -48,6 +48,8 @@ private Pointers() {}
     public static final JsonPointer FUNCTION_STATES = 
JsonPointer.compile("/function/spec/states");
     public static final JsonPointer FUNCTION_TIMEOUT =
         JsonPointer.compile("/function/spec/timeout");
+    public static final JsonPointer FUNCTION_MAX_HTTP_BATCH_SIZE =
+        JsonPointer.compile("/function/spec/maxBatchSize");
 
 Review comment:
   I'm wondering should we rather call this `maxNumBatchRequests` or something 
along those lines.
   Just to clearly avoid potential confusion that its the accumulated data size 
of the HTTP request, and also to leave room for us to add such a 
data-size-based threshold in the future.
   
   My reasoning is:
   Just seeing it from the user perspective, if I were the user I would 
probably set this based on the desired max HTTP request data size, i.e.:
   ```
   configValue = desiredMaxBatchDataSize / averageMessageSize
   ```
   
   I can see a reason in the future to add such a data-size-based threshold.
   This _might_ in some cases be more intuitive to use than a 
request-count-based threshold. For example, AWS API gateway has an upper limit 
based on the size of HTTP request bodies.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to