Azure Application Gateway how to dynamically redirect based on table-data












0















In a sharding configuration across multiple Azure-VMs (Linux), each with its own sub-domain (wildcard *.domain.com Azure dns-zone), the gateway must parses the SUB-DOMAIN-NAME.domain.com connect attempt and access a remote Azure Table-Storage (or any other REST endpoint) to determine which target Azure-VM to use for this. This Azure-VM determined will then be used for the remainder of the sticky-session (affinity cookie).



This should be possible via PowerShell configuration, but current limitations seem to exist as described here:
https://serverfault.com/questions/881988/azure-application-gateway-limitations-wildcard-ssl-cert



https://feedback.azure.com/forums/217313-networking/suggestions/19527121-application-gateway-support-wildcard-hosts-in-lis



Any tips on support for this scenario within the Azure Application Gateway or do I need to look elsewhere?



Secondary question but also necessary for this scenario: access to an Azure-table-storage from the Azure Application Gateway PowerShell possible?










share|improve this question





























    0















    In a sharding configuration across multiple Azure-VMs (Linux), each with its own sub-domain (wildcard *.domain.com Azure dns-zone), the gateway must parses the SUB-DOMAIN-NAME.domain.com connect attempt and access a remote Azure Table-Storage (or any other REST endpoint) to determine which target Azure-VM to use for this. This Azure-VM determined will then be used for the remainder of the sticky-session (affinity cookie).



    This should be possible via PowerShell configuration, but current limitations seem to exist as described here:
    https://serverfault.com/questions/881988/azure-application-gateway-limitations-wildcard-ssl-cert



    https://feedback.azure.com/forums/217313-networking/suggestions/19527121-application-gateway-support-wildcard-hosts-in-lis



    Any tips on support for this scenario within the Azure Application Gateway or do I need to look elsewhere?



    Secondary question but also necessary for this scenario: access to an Azure-table-storage from the Azure Application Gateway PowerShell possible?










    share|improve this question



























      0












      0








      0








      In a sharding configuration across multiple Azure-VMs (Linux), each with its own sub-domain (wildcard *.domain.com Azure dns-zone), the gateway must parses the SUB-DOMAIN-NAME.domain.com connect attempt and access a remote Azure Table-Storage (or any other REST endpoint) to determine which target Azure-VM to use for this. This Azure-VM determined will then be used for the remainder of the sticky-session (affinity cookie).



      This should be possible via PowerShell configuration, but current limitations seem to exist as described here:
      https://serverfault.com/questions/881988/azure-application-gateway-limitations-wildcard-ssl-cert



      https://feedback.azure.com/forums/217313-networking/suggestions/19527121-application-gateway-support-wildcard-hosts-in-lis



      Any tips on support for this scenario within the Azure Application Gateway or do I need to look elsewhere?



      Secondary question but also necessary for this scenario: access to an Azure-table-storage from the Azure Application Gateway PowerShell possible?










      share|improve this question
















      In a sharding configuration across multiple Azure-VMs (Linux), each with its own sub-domain (wildcard *.domain.com Azure dns-zone), the gateway must parses the SUB-DOMAIN-NAME.domain.com connect attempt and access a remote Azure Table-Storage (or any other REST endpoint) to determine which target Azure-VM to use for this. This Azure-VM determined will then be used for the remainder of the sticky-session (affinity cookie).



      This should be possible via PowerShell configuration, but current limitations seem to exist as described here:
      https://serverfault.com/questions/881988/azure-application-gateway-limitations-wildcard-ssl-cert



      https://feedback.azure.com/forums/217313-networking/suggestions/19527121-application-gateway-support-wildcard-hosts-in-lis



      Any tips on support for this scenario within the Azure Application Gateway or do I need to look elsewhere?



      Secondary question but also necessary for this scenario: access to an Azure-table-storage from the Azure Application Gateway PowerShell possible?







      azure azure-application-gateway






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 13 at 19:28









      marc_s

      581k13011201268




      581k13011201268










      asked Jan 1 at 16:46









      GGleGrandGGleGrand

      8581031




      8581031
























          1 Answer
          1






          active

          oldest

          votes


















          0
















          1. You cant have wildcard listener in an Azure Application Gateway, but you can have a generic listener, which will route all traffic to some endpoint, so your listeners can be something like this:




            • hostA.domain.com > host1

            • hostB.domain.com > host2

            • hostA.example.com > host3

            • hostB.example.com > host4
              ...

            • everything that doesnt match the above hostnames goes to this last listener > hostx



          2. there is no Azure Application Gateway PowerShell, you just have Azure Application Gateway module in PowerShell, so you can use anything you can regularly use in PowerShell along with Azure Application Gateway cmdlets. Here's an example of how to query Azure Table storage in PowerShell.







          share|improve this answer
























          • Appreciated. Your item 1. needs to be dynamic though (runtime): every time a new hostX appears on one of the hostN, then a new entry must also appear in the listeners list as hostXsub.domain.com > hostN-VM. Possible? Same applies for item 2. PowerShell used for a pre-configuring is not adequate for this scenario, I need the PowerShell intepreter at runtime to query the Table-Store since the table is continually growing with new hostXsubdomain > hostN-VM entries. I hope I'm still missing something?

            – GGleGrand
            Jan 2 at 17:16













          • 1. no, you need to create a script to do that 2. i dont understand the question. you can run powershell script at anytime to do that. but keep in mind you are limited to 40 listeners per application gateway.

            – 4c74356b41
            Jan 2 at 17:30






          • 1





            Thanks. OK, updating the whole configuration (via PS) each time a new subdomain appears is not feasible (seconds) and the limit of 40 is the real show stopper (thousands). It would be so easy to support this scenario. Elas, too bad I can't use the application gateway. Thanks for clarity here.

            – GGleGrand
            Jan 2 at 19:44











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53997217%2fazure-application-gateway-how-to-dynamically-redirect-based-on-table-data%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0
















          1. You cant have wildcard listener in an Azure Application Gateway, but you can have a generic listener, which will route all traffic to some endpoint, so your listeners can be something like this:




            • hostA.domain.com > host1

            • hostB.domain.com > host2

            • hostA.example.com > host3

            • hostB.example.com > host4
              ...

            • everything that doesnt match the above hostnames goes to this last listener > hostx



          2. there is no Azure Application Gateway PowerShell, you just have Azure Application Gateway module in PowerShell, so you can use anything you can regularly use in PowerShell along with Azure Application Gateway cmdlets. Here's an example of how to query Azure Table storage in PowerShell.







          share|improve this answer
























          • Appreciated. Your item 1. needs to be dynamic though (runtime): every time a new hostX appears on one of the hostN, then a new entry must also appear in the listeners list as hostXsub.domain.com > hostN-VM. Possible? Same applies for item 2. PowerShell used for a pre-configuring is not adequate for this scenario, I need the PowerShell intepreter at runtime to query the Table-Store since the table is continually growing with new hostXsubdomain > hostN-VM entries. I hope I'm still missing something?

            – GGleGrand
            Jan 2 at 17:16













          • 1. no, you need to create a script to do that 2. i dont understand the question. you can run powershell script at anytime to do that. but keep in mind you are limited to 40 listeners per application gateway.

            – 4c74356b41
            Jan 2 at 17:30






          • 1





            Thanks. OK, updating the whole configuration (via PS) each time a new subdomain appears is not feasible (seconds) and the limit of 40 is the real show stopper (thousands). It would be so easy to support this scenario. Elas, too bad I can't use the application gateway. Thanks for clarity here.

            – GGleGrand
            Jan 2 at 19:44
















          0
















          1. You cant have wildcard listener in an Azure Application Gateway, but you can have a generic listener, which will route all traffic to some endpoint, so your listeners can be something like this:




            • hostA.domain.com > host1

            • hostB.domain.com > host2

            • hostA.example.com > host3

            • hostB.example.com > host4
              ...

            • everything that doesnt match the above hostnames goes to this last listener > hostx



          2. there is no Azure Application Gateway PowerShell, you just have Azure Application Gateway module in PowerShell, so you can use anything you can regularly use in PowerShell along with Azure Application Gateway cmdlets. Here's an example of how to query Azure Table storage in PowerShell.







          share|improve this answer
























          • Appreciated. Your item 1. needs to be dynamic though (runtime): every time a new hostX appears on one of the hostN, then a new entry must also appear in the listeners list as hostXsub.domain.com > hostN-VM. Possible? Same applies for item 2. PowerShell used for a pre-configuring is not adequate for this scenario, I need the PowerShell intepreter at runtime to query the Table-Store since the table is continually growing with new hostXsubdomain > hostN-VM entries. I hope I'm still missing something?

            – GGleGrand
            Jan 2 at 17:16













          • 1. no, you need to create a script to do that 2. i dont understand the question. you can run powershell script at anytime to do that. but keep in mind you are limited to 40 listeners per application gateway.

            – 4c74356b41
            Jan 2 at 17:30






          • 1





            Thanks. OK, updating the whole configuration (via PS) each time a new subdomain appears is not feasible (seconds) and the limit of 40 is the real show stopper (thousands). It would be so easy to support this scenario. Elas, too bad I can't use the application gateway. Thanks for clarity here.

            – GGleGrand
            Jan 2 at 19:44














          0












          0








          0









          1. You cant have wildcard listener in an Azure Application Gateway, but you can have a generic listener, which will route all traffic to some endpoint, so your listeners can be something like this:




            • hostA.domain.com > host1

            • hostB.domain.com > host2

            • hostA.example.com > host3

            • hostB.example.com > host4
              ...

            • everything that doesnt match the above hostnames goes to this last listener > hostx



          2. there is no Azure Application Gateway PowerShell, you just have Azure Application Gateway module in PowerShell, so you can use anything you can regularly use in PowerShell along with Azure Application Gateway cmdlets. Here's an example of how to query Azure Table storage in PowerShell.







          share|improve this answer















          1. You cant have wildcard listener in an Azure Application Gateway, but you can have a generic listener, which will route all traffic to some endpoint, so your listeners can be something like this:




            • hostA.domain.com > host1

            • hostB.domain.com > host2

            • hostA.example.com > host3

            • hostB.example.com > host4
              ...

            • everything that doesnt match the above hostnames goes to this last listener > hostx



          2. there is no Azure Application Gateway PowerShell, you just have Azure Application Gateway module in PowerShell, so you can use anything you can regularly use in PowerShell along with Azure Application Gateway cmdlets. Here's an example of how to query Azure Table storage in PowerShell.








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 1 at 17:41









          4c74356b414c74356b41

          31k42456




          31k42456













          • Appreciated. Your item 1. needs to be dynamic though (runtime): every time a new hostX appears on one of the hostN, then a new entry must also appear in the listeners list as hostXsub.domain.com > hostN-VM. Possible? Same applies for item 2. PowerShell used for a pre-configuring is not adequate for this scenario, I need the PowerShell intepreter at runtime to query the Table-Store since the table is continually growing with new hostXsubdomain > hostN-VM entries. I hope I'm still missing something?

            – GGleGrand
            Jan 2 at 17:16













          • 1. no, you need to create a script to do that 2. i dont understand the question. you can run powershell script at anytime to do that. but keep in mind you are limited to 40 listeners per application gateway.

            – 4c74356b41
            Jan 2 at 17:30






          • 1





            Thanks. OK, updating the whole configuration (via PS) each time a new subdomain appears is not feasible (seconds) and the limit of 40 is the real show stopper (thousands). It would be so easy to support this scenario. Elas, too bad I can't use the application gateway. Thanks for clarity here.

            – GGleGrand
            Jan 2 at 19:44



















          • Appreciated. Your item 1. needs to be dynamic though (runtime): every time a new hostX appears on one of the hostN, then a new entry must also appear in the listeners list as hostXsub.domain.com > hostN-VM. Possible? Same applies for item 2. PowerShell used for a pre-configuring is not adequate for this scenario, I need the PowerShell intepreter at runtime to query the Table-Store since the table is continually growing with new hostXsubdomain > hostN-VM entries. I hope I'm still missing something?

            – GGleGrand
            Jan 2 at 17:16













          • 1. no, you need to create a script to do that 2. i dont understand the question. you can run powershell script at anytime to do that. but keep in mind you are limited to 40 listeners per application gateway.

            – 4c74356b41
            Jan 2 at 17:30






          • 1





            Thanks. OK, updating the whole configuration (via PS) each time a new subdomain appears is not feasible (seconds) and the limit of 40 is the real show stopper (thousands). It would be so easy to support this scenario. Elas, too bad I can't use the application gateway. Thanks for clarity here.

            – GGleGrand
            Jan 2 at 19:44

















          Appreciated. Your item 1. needs to be dynamic though (runtime): every time a new hostX appears on one of the hostN, then a new entry must also appear in the listeners list as hostXsub.domain.com > hostN-VM. Possible? Same applies for item 2. PowerShell used for a pre-configuring is not adequate for this scenario, I need the PowerShell intepreter at runtime to query the Table-Store since the table is continually growing with new hostXsubdomain > hostN-VM entries. I hope I'm still missing something?

          – GGleGrand
          Jan 2 at 17:16







          Appreciated. Your item 1. needs to be dynamic though (runtime): every time a new hostX appears on one of the hostN, then a new entry must also appear in the listeners list as hostXsub.domain.com > hostN-VM. Possible? Same applies for item 2. PowerShell used for a pre-configuring is not adequate for this scenario, I need the PowerShell intepreter at runtime to query the Table-Store since the table is continually growing with new hostXsubdomain > hostN-VM entries. I hope I'm still missing something?

          – GGleGrand
          Jan 2 at 17:16















          1. no, you need to create a script to do that 2. i dont understand the question. you can run powershell script at anytime to do that. but keep in mind you are limited to 40 listeners per application gateway.

          – 4c74356b41
          Jan 2 at 17:30





          1. no, you need to create a script to do that 2. i dont understand the question. you can run powershell script at anytime to do that. but keep in mind you are limited to 40 listeners per application gateway.

          – 4c74356b41
          Jan 2 at 17:30




          1




          1





          Thanks. OK, updating the whole configuration (via PS) each time a new subdomain appears is not feasible (seconds) and the limit of 40 is the real show stopper (thousands). It would be so easy to support this scenario. Elas, too bad I can't use the application gateway. Thanks for clarity here.

          – GGleGrand
          Jan 2 at 19:44





          Thanks. OK, updating the whole configuration (via PS) each time a new subdomain appears is not feasible (seconds) and the limit of 40 is the real show stopper (thousands). It would be so easy to support this scenario. Elas, too bad I can't use the application gateway. Thanks for clarity here.

          – GGleGrand
          Jan 2 at 19:44




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53997217%2fazure-application-gateway-how-to-dynamically-redirect-based-on-table-data%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith