1. mike S
  2. PowerServer
  3. Monday, 13 February 2023 17:09 PM UTC

To fully test a powerserver application that will be running over the internet, you must setup a test system that mimics your production environment fully.  running your application using a local IIS will not provide you with the performance feedback of what your production environment will give you.  You can easily setup an VM running IIS for your test system, however you will be paying for a full vm just for testing.  Often testing systems are not required to be running throughout the day, let alone after work hours.  You can shutdown those vms to save some money, but you are still paying for running a full vm when it is running.  

 

To run powerserver you need 3 components:  the database server, the web server, and the web api server.  The database server should already be accounted for if you are running an internet deployed application, so we can assume it is already paid for.

For the web api, you can use containers.  In azure you can setup a container app, and setup auto scaling with the scale set to 0 to 1.  That means that when the container hasn't been accessed in 5 minutes (see azure docs for current time outs), it will shut down and not cost you any money (it auto starts when accessed).  You can also scale the container size in cpu and memory.  I would not scale below 1 cpu even for testing.

you do need to have a container registry setup such as the azure container registry, docker hub, etc.  There is charge for that, but if you are using containers for your production environment, then that cost is already paid for.

 

You also need to serve out the application via a web server.  In azure storage services, there is an option to configure a static website using the storage account.  Azure storage costs are extremely low.  To host your powerserver application on azure storage you will probably pay under $1, probably less than 20 cents per month.  

 

This means that your costs per month for an unused test server is about $1, assuming you are already paying for your container registry and database server.  When running the test server, you will be charged for the app container service when it is actively doing something and at a much lower cost when it is idle.  Azure even has a free grant so if you are below the free granted usage, then your container app cost will still be zero.

 

 

 

 

mike S Accepted Answer Pending Moderation
  1. Monday, 13 February 2023 17:34 PM UTC
  2. PowerServer
  3. # 1

In addition to this, if you ARE running your system in a VM and you are using web api authentication (you ARE using authentication, right?), then your test VM will require an SSL cert.  You can generate a self signed cert, or buy one.  If you use the self signed cert, then you would have to manually change your application object settings to ignore server cert errors at the appropriate level (this is pain to remember to do and you cannot change it in code at runtime).    You would also have to remember to change that setting back for production use.

 

However, if you use the azure app container service for your web api, the SSL cert is included.  that means you can keep the SSL validation setting in your application object to not ignore ssl errors just as you will for production.  its free (included in the container app costs).

 

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.