locked
many webapis instead one webapi to offload website RRS feed

  • Question

  • User-1350516731 posted

    Hello all!

    Is it necessary to create many webapis with one method per api instead one webapi with many methods that potentially could be unresponsive in some time-slices? And when I need to duplicate each my webapi node when I need to make whole resource relible? Please, give arguments.

    Thank you for advice.

    Wednesday, September 20, 2017 3:14 PM

All replies

  • User475983607 posted

    Hello all!

    Is it necessary to create many webapis with one method per api instead one webapi with many methods that potentially could be unresponsive in some time-slices? And when I need to duplicate each my webapi node when I need to make whole resource relible? Please, give arguments.

    Thank you for advice.

    What do you mean unresponsive in some time-slice?  Can you provide example code that exhibits this behavior?  Are you having a problem with async/await programming?

    Web API is a request/response framework.  If Web API becomes unresponsive then more then likely you have a bug.  If Web API is unresponsive do to load then adding a load balancer to divide the load solves the problem.

    Can you explain what problem are you trying to solve?

    Wednesday, September 20, 2017 3:35 PM
  • User-1350516731 posted

    First of all, I need to get availability of many hosts which can be used to get certain data depending on the host's load. It's data will be contained into iframe's on single website's page.

    Wednesday, September 20, 2017 4:32 PM
  • User475983607 posted

    First of all, I need to get availability of many hosts which can be used to get certain data depending on the host's load. It's data will be contained into iframe's on single website's page.

    Counters are generally used to quantify an esoteric term like load.  IMHO, Web API is the wrong tool to fetch remote counters.  Normally, you would have another system running an app that aggregates counter data from many systems. 

    The web site that displays this information gets the data from the machine that aggregates the data.  Perhaps from a DB or a rolling log.

    https://support.microsoft.com/en-us/help/246758/how-to-monitor-performance-of-a-remote-computer-without-logging-on-to

    https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.diagnostics/get-counter?view=powershell-5.1

    Wednesday, September 20, 2017 4:54 PM
  • User-1350516731 posted

    Thank you a lot!

    I want to use shared hosting for my websites. Is it necessary to manage own virtual machine and windows?

    Wednesday, September 20, 2017 7:26 PM
  • User475983607 posted

    I want to use shared hosting for my websites. Is it necessary to manage own virtual machine and windows?

    Shared hosting and virtual machines are two very different things.  Contact your hosting provider for details on the services they offer.

    Wednesday, September 20, 2017 10:29 PM
  • User-474980206 posted
    There is no performance difference between having a controller with a lot of actions or a lot of controllers with one action. Each requests creates a new controller and calls the action.

    Friday, September 22, 2017 2:11 PM