Posts

Showing posts with the label HTTP

HTTP/2 - HTTP/1

HTTP/1.1 assumes that a TCP connection should be kept open unless directly told to close. HTTP2 reduces latency by using multiplexing, compression and prioritization. An application level API would still create messages in the conventional HTTP formats, but the underlying layer converts the payload into binary (binary framing). HTTP/2 establishes a single connection object between the two machines. Within this connection there are multiple streams of data. Each stream consists of multiple messages in the familiar request/response format. Finally, each of these messages split into smaller units called frames. Multiplexing: Several requests and responses can run in parallel using a single TCP connection without blocking each other. This reduces processor and memory resources and the SSL handshakes. Stream prioritization feature allows developers to prioritize the requests by assigning a weight between 1 and 256 to each stream. The higher number indicates higher priority.  serve...

REST Endpoint: Consume / Produce JSON/XML

Image
Import Jackson Data format: Annotate the REST method to consume and produce the desired format(s): In HTTP Request header, set attribute: Content-Type  to application/json|xml to indicate the body format Accept  to application/json|xml to indicate the desired response format

NGINX HTTP server

"NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. NGINX is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption. NGINX is one of a handful of servers written to address the C10K problem . Unlike traditional servers, NGINX doesn’t rely on threads to handle requests. Instead it uses a much more scalable event-driven (asynchronous) architecture ..." https://www.nginx.com/resources/wiki/