igalshilman opened a new pull request #30: [FLINK-16226] Add Backpressure to 
HttpFunction
URL: https://github.com/apache/flink-statefun/pull/30
 
 
   ## This PR uses the back pressure mechanism introduced in #29 to support 
back pressure in `HttpFunction`.
   
   ## Background  
   When an Http remote function (`HttpFunction`) invokes a function remotely 
for a specific address, it would wait for a response to come back 
asynchronously. While it waits for 
   the response, new messages for that address might arrive, the `HttpFunction` 
start logging these requests in a persisted state, and when the original 
request completes the `HttpFunction` would batch these requests and send it off 
as a single request.
   
   In order to keep that state under control, the `HttpFunction` needs to limit 
the maximum allowed batch size, this PR provides that.
    
   
   ## User supplied property
   The first part of this PR adds a property `maxBatchSize` to the function 
spec in `module.yaml`
   
   ```
   - function:
             meta:
               kind: http
               type: org.foo/bar
             spec:
              ...
               maxBatch: 10
   ``` 
   
   This would indicate that the max batch size that would be sent, per address, 
for the function `org.foo/bar` is limited to 10 messages. Users can also omit 
that value and then the default value of 1,000 is selected.
   
   

----------------------------------------------------------------
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