PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, June 25, 2022

[FIXED] How to get Service Fabric Reverse Proxy to work on Azure

 June 25, 2022     asp.net-core, azure-service-fabric, c#, reverse-proxy     No comments   

Issue

I created a Azure Service Fabric Web API and planned to reach it through Service Fabric's built in Reverse Proxy.

All was working well locally but when I published to Azure, trying to access the route through Reverse Proxy would time out.

I thought it might be my app, so I just popped open a new solution with the default template and published to my local. Everything worked fine Reverse Proxy and all. So I published to Azure and again had the same issue.

I could access the Web API on azure through the normal route (through the endpoint of the service) for example:

xxxx.east.cloudapp.azure:8080/api/values

But going through the Reverse Proxy port of 19081 times out:

xxxx.east.cloudapp.azure:19081/[app]/[service]/api/values

I did make sure to tick off Enable Reverse Proxy when setting up the cluster resource on Azure, and set the port to 19081. Both of the above works fine on localhost, but only the normal route works on Azure.

Was wondering if there's some extra editing of the manifest or something I had to do to make it work on Azure correctly?


Solution

Did you see the documentation on how to configure it?

If you're going to expose services on the internet, be aware that the built-in one causes every service to become exposed, it's not hardened, it's vulnerable to DOS attacks. Docs

I recommend having a look at Traefik as a reverse proxy and load balancer. You can run it as a (containerized) ingress routing service inside the cluster, and direct HTTP calls to your services.

  • Here's the documentation.
  • Here's how to get started.
  • Here's an example.

Alternatively, you can use Api Gateway, which integrates with SF too. Or even Nginx.



Answered By - LoekD
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,216,974

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing