hanicz opened a new pull request, #1049:
URL: https://github.com/apache/knox/pull/1049

   ## What changes were proposed in this pull request?
   
   This PR builds on [PR-947](https://github.com/apache/knox/pull/947) and 
[PR-1010](https://github.com/apache/knox/pull/1010). It completes the SSE 
feature by adding the failover capability to the HA dispatch. 
   
   - Fixed a bug where service connection error wasn't sent to the client for 
non HA
   - Renamed `LBHaDispatch` -> `CommonHaDispatch` since it holds failover logic 
as well now
   - Moved failover logic from `ConfigurableHaDispatch` to `CommonHaDispatch` 
to avoid code duplication
   - Added failover for `SSEHaDispatch`
   - New tests for SSE HA to cover the new failover capability
   - Moved `httpcore` dependency exclusions to the parent pom level
   
   ## How was this patch tested?
   
   Unit tests
   Manual tests
   
   Local setup:
   
   I had a custom SSE service running locally.
   
   ```
           <provider>
               <role>ha</role>
               <name>HaProvider</name>
               <enabled>true</enabled>
               <param>
                   <name>SSERVICE</name>
                   <value>
                       
maxFailoverAttempts=3;failoverSleep=1000;enableStickySession=true;enabled=true;enableLoadBalancing=true;noFallback=true
                   </value>
               </param>
               <param>
                   <name>HUE</name>
                   <value>
                       
enableStickySession=true;enabled=true;enableLoadBalancing=true;maxFailoverAttempts=1;failoverSleep=1000
                   </value>
               </param>
           </provider>
   
       <service>
           <role>HUE</role>
           <url>http://localhost3:7435</url>
           <url>http://localhost:7435</url>
           <url>http://localhost2:7435</url>
           <url>http://localhost1:7435</url>
           <url>http://localhost5:7435</url>
       </service>
   
       <service>
           <role>SSERVICE</role>
           <url>http://localhost3:7435</url>
           <url>http://localhost:7435</url>
           <url>http://localhost2:7435</url>
           <url>http://localhost1:7435</url>
           <url>http://localhost5:7435</url>
       </service>
   ```
   
   `curl -k -i -u admin:admin-password 
https://localhost:8443/gateway/mytopology/hue/sse`
   `curl -k -i -u admin:admin-password 
https://localhost:8443/gateway/mytopology/sservice/sse`


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

To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to