Announcement

Collapse
No announcement yet.

Sample 9A

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sample 9A

    In Sample 9A the Global Web Server is stopped and reinitialized using SSL Certificate Information. When the Server is reinitialized the HttpInit function is used to get a pointer to the new HttpServer. What I was wondering is if the values that are used as parameters here are the defaults when the HttpServer is first initialized (since we do not see the initial initialization). I basicallly just want to know what the defaults are for the following:

    numWorkerTHreads
    pRootDirectory
    pDefaultFileName
    maxQueueLength
    serverBackLog
    requestMaxTimeout
    requestMaxBytes

    Thanks.

  • #2
    HttpInit

    The normal defaults are:

    numWorkerTHreads = 2
    pRootDirectory = "/http"
    pDefaultFileName = "index.html"
    maxQueueLength = 3
    serverBackLog = 5
    requestMaxTimeout = (from user configuration)
    requestMaxBytes = (from user configuration)

    Comment


    • #3
      More Information

      I was also wondering about the default value for:
      maxDynamicCallbacks.

      I also was hoping to get a better understanding of what these values actually control and what the pro /cons are of changing the following values:

      numWorkerThreads
      maxQueueLength
      serverBackLog

      Comment


      • #4
        maxDynamicCallbacks

        maxDynamicCallbacks default is 10.

        Function of:

        numWorkerThreads: Number of tasks to spawn which can work on received HTTP requests in parallel. There is not likely to be any significant performance improvement to increase this beyond the default of 3, but additional tasks would each consume more heap for their stack space.

        maxQueueLength: Number of HttpRequests that can be queued up. Each HttpRequest is fed to a worker thread when one becomes available.

        serverBackLog: Number of simultaneous sockets that can be opened when listening for HttpRequests.

        The only reason to ever consider changing these values might be if your application needs to block for some significant amount of time before it responds to the HttpRequest. Then multi-tasking might be important for performance of your application across many simultaneous requests, and these parameters would allow you to achieve the proper balance. I expect that it is unlikely you will ever need to touch these parameters.

        Comment

        Working...
        X