Service Fabric Reverse Proxy - Request Cancelation not working - reverse-proxy

I have experienced unexpected behavior from Service Fabric Reverse Proxy.
When I abort a long-running request the proxy request to the Service Fabric Service is not being aborted and the whole request is executed.
If we make requests directly to the service, requests are canceled as expected.
An uninterrupted run of the long request - directly to the service
An interrupted run of the long request - directly to the service
Is there a setting that we need to enable so Service Fabric Reverse Proxy handles the requests as we expect it to?

Consider using Traefik instead, which is a more mature product.
It comes with an active community and request termination support.
It also doesn't have the undesired side effect of exposing all SF services by default.

Related

How to make kubernetes nodes outgoing request use System network

My spring boot application needs to call a third party API to verify an user data. now the API provided from third party, they have some restrictions like they only accept if the request comes from some specific IP.
Now our network consultant has made one of my worker nodes to be able to request this API. I can curl the request to the API and get a proper response. I can deploy my application on that worker node outside of kubernetes using tomcat and get proper response.
But when I deploy it on kubernetes cluster, it does not work. Does not work means that API don't accept/process the request. 503 service not available something like that.
Then I tried to curl the request from inside the pods of worker node and found it does not work.
So, I am guessing my Kubernetes is not using the configuration on the system network.
So is there any way I can make my worker node(even one worker node) to use the system network while calling that or any third party API, as I can see I can request and get proper response from API when I request it outside the cluster but from the worker node pc.

Issue using APIgee as API gateway calling WCF RESTful service

I have WCF RESTful services running on IIS6. (public exposed on internet)
example
http://{domain}:8000/todoService.svc/countPerLabel?uMID={uMID}&userID={userID}
I have setup APIGEE proxy API manager gateway to call the the WCF services.
http://{APIGEE}/v1/todo/countperlabel?uMID={uMID}&userID={userID}
Case A. When i call the APIGEE url for the first time it works - but when i make another call it delays for few seconds and response with timeout/service unavailable.
If i wait for about 10 minutes and calls the service again Case A occurs.
I am not able to understand - if i call my service url independently without APIgee everything works well.
I don't not want to give third party developer access to naked API url therefore like to secure it using either APIgee or WSO2.
Is it something to do with proxy issues where my IIS6 not able to respond back to request from proxy server?
Kindly suggest.
Thanks
It seems you are having multiple endpoints. First call goes to one endpoint and the second to another one. Why dont you try a third call as well. If it works and the fourth one fails, then my explanation is correct. If it is the case, one of your endpoints may be having firewall issues.

SIlverligh Client WCF routing performance

I am experiencing a strange issue in my browser hosted silverlight application. Call are made to a WCF routing service hosted in on IIS 7. The routing service then switches the protocol to nettcp and routes the request to another WCF service on our application server. This second service is hosted in a windows service. What I am noticing is that when a client on one machine invokes a long running request other users on the network cannot even get smaller requests serviced till the long running request returns. Has anyone experienced this or does anyone know what can be causing this?

Can I listen to a WCF event from a web client?

Can I listen to a WCF event from a web client? Is this possible? I am not talking about call backs, I want the WCF service to raise and event and the web client to be able to listen. Is there a good example of this in C#?
There are no events in WCF. If you want mimic event you still have to call some operation exposed on all clients = you must call WCF service or callback exposed on client.
What do you mean by web client? Do you mean javascript code running in web browser? In such case no you can't achieve that with WCF. You can only use AJAX calls from borowser and continuously poll the service for possible "event".
If you mean ASP.NET application then the answer is theoretically yes, practiacally it will be pretty hard. The reason is that in ASP.NET you handle only current HTTP request by some handler - for example Page. The lifetime of the handler is only for serving the single request. Due to that using duplex service doesn't make to much sense because for receiving callbacks by duplex service your client proxy must live. If you open the proxy in Page it will die after serving the request. If you open the proxy in separate thread you must somehow corelate incomming callbacks to actual client but the client still have to poll the web server to be notified about callbacks. Similar situation will be with exposing the service on ASP.NET application.
Difference between asynchronnous and duplex calls is big. In asynchronnous pattern single request always have single response. Resonse is not sent without request. In duplex pattern you can make single request and receive thousands callback from server.

wcf service stops after few requests

I am working on an application where i am using a wcf service. I am currently hosting my service on localhost and accessing it from there only by adding the service reference in my project. On one of my page i am sending request on change of selected index on dropdown list. It works fine for first few requests but suddenly stops after that giving following excsption
"Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service."
How can service stop without any reason and that too from my localhost. It only works for first 3-4 requests. In service i am just sending a integer and getting back the records on its basis using a class in a generic list.
Thanks in advance
What protocol / bindings are you using? Can you show us the config? Anything inside the <system.serviceModel> on both the server and the client side.
Do you maybe create a client proxy and call the service method and not properly close and dispose of the client proxy? In that case, you might run out of connections at some point - but that's next to impossible to tell without some code to see what you're doing. Can you show us the service contract in question, and the code how you call it from the client side?