Iterative Server

Meaning – The term iterative server, refers to the server that can handle only one connection at a time. It can accept a new connection request only when it has completed processing the transaction started by a previous request.

An iterative server handles both the connection request and the transaction involved in the call itself. Iterative servers are fairly simple and are suitable for transactions that do not last long.

However, if the transaction takes more time, queues can build up quickly.

Example of usage“When a server invokes the accept() method of a ServerSocket object, the server thread blocks until a client connects to the server. The server must handle the client’s request then go back to listening for further client connections. In an iterative server, the main server method handles each client request in its entirety before moving on to accept the next request.”