## Hypertext Transfer Protocol (HTTP) Configuration

HTTP is the foundation of the World Wide Web and is used to load web pages using hypertext links. HTTP allows the fetching of resources, such as HTML documents.

## HTTP Ports

It is used to specify the ports for HTTP communication. It has the following options:

- IPv4 ports: HTTP port for IP version 4.
- IPv6 ports: HTTP port for IP version 6.
- IPv4 Secure ports: HTTPS port for IP version 4.
- IPv6 Secure ports: HTTPS port for IP version 6.
- Listen on Specified IP Address: The IP Address where the HPD listens with Normal mode.

## HTTP Settings

- Keep Alive Connection Time Out: A browser typically makes multiple requests in order to download an entire Web page. To enhance server performance, most Web browsers request that the server keep the connection open across these multiple requests, which is a feature known as HTTP keep-alive. Without HTTP keep-alive, a browser that makes many requests for a page containing multiple elements, such as graphics, might require a separate connection for each element. These additional requests and connections require extra server activity and resources, decreasing server efficiency. The additional connections also make a browser much slower and less responsive, especially across a slow connection.
- Directory Index: Sets the file that HPD will serve if a directory is requested. If the Directory Index is not configured, then 404 is returned.
- >Compression Type: To enable the different types of 'Content-Encoding' header in http response like Br, gzip, and deflate. The response will also be compressed.
  - Compression Type: To enable the different types of 'Content-Encoding' header in http response like Br, gzip, and deflate. The response will also be compressed.
  - None: No Compression
  - Gzip or Deflate: Gzip (or Deflate) compresses the web pages and CSS files before sending them to the browser. This operation drastically reduces transfer time since the files are much smaller. In terms of cost versus benefit, gzip compression should be near the top of your page speed optimizations if you don't have it setup already. Gzip is actually a very simple idea that has extreme power (when put to good use of course). Gzip locates similar strings within a text file (in our case this is commonly CSS and HTML codes) and replaces those strings temporarily with some placeholders to make the overall file size smaller.
  - BR: Brotli compression ensures better space utilization and faster page loads with smaller compressed size and it is far better than gzip compression mechanism. While Gzip compression uses a fixed window of 32KB but Brotli uses a sliding window of 1KB to 16MB. In NetOcean, Brotli technique is applicable for Correlated Services as well as Static Services.
- URL Ignore Case: If it is enabled, the URL becomes case insensitive.
- Send Date Header in Response: To enable an additional header (i.e Date Header) which contains current date & time in response.
- Send Server Header in Response: To enable Server Header in the response. (Output :- Server: Cavisson NetOcean (Linux) (IP: 10.10.30.24:8010)).
- HTTP Protocol Version: There are the following three http protocol versions supported by service virtualization:
  - HTTP 1.x : It is used for HTTP 1.1 protocol. It is on top of a TCP connection.
  - HTTP 2.x : By selecting this, the user can configure services in HTTP 2 and HTTP 1. x. HTTP2 multiplexing is also supported at the service virtualization side to process multiple HTTP requests of Inline/Embedded URLs concurrently on different streams using a single TCP connection.
  - HTTP 1.x/2/3 : By selecting this, the user can configure services in HTTP 1.x, HTTP 2, and HTTP 3. HTTP3 aims to provide a faster and more efficient internet experience without compromising security. It uses a new protocol QUIC.
- Content Length Indicator: To transfer data into a series of overlapping chunks. Once you select this check box, more options are displayed in the below format.
  - Mode: There are further two modes – ‘disable’ and ‘enable’ to specify whether the features should be disabled or enabled.
  - Chunk Scheme: Chunk Scheme is based on two options:
    1. Size of Chunk: The size of the individual chunk.
    2. Number of Chunk: The number of chunks in which the response should be served.
- HTTP/2 Settings: It has the following options:
  - Server Push: You can enable/disable server push globally. To make changes in Server-Push, you need to change the HTTP Mode from 1.X to 1.X/2 and then enable the Server-Push Mode. If server push is enabled, a setting is enabled in static services’ configuration.
  - Maximum Concurrent Streams: The number of streams that the server permits to create at a particular time. The range is 100 to 500.
  - Initial Window Size: The server’s initial window size (in octets) for stream-level flow control. The range is 65535 (2^16-1) to 2147483647 (2^31-1) bytes.
  - Maximum Frame Size: The size of the largest frame payload that the server is willing to receive. The range is 16384 (2^14) to 16777215 (2^24-1) bytes.
  - Header Table Size: The maximum size of the header compression table used to decode header blocks in octets. The range is 4096 (2^12) to 65535 (2^16-1) bytes.