WEBrick is a Ruby library providing simple HTTP web servers. It uses basic access authentication and digest access authentication for different kinds of servers that it can create - HTTP based server, HTTPS server, proxy server and virtual-host server. Construction of several non-HTTP servers such as the Day Time Server which uses the Daytime Protocol rather than the HTTP is also facilitated by WEBrick. It is used by the Ruby on Rails and Padrino frameworks to test applications in a development environment as well as production mode for small loads. It is now a part of Ruby standard library. to increase the modularity.
Starting a virtual host
WEBrick creates a listening port. Various other ports as ‘virtual hosts’ can also be created at the same time which do not listen as shown below: Hence, multiple requests at the same time cannot be handled and the subsequent requests would have to wait till all the previous requests have been handled, incurring a large delay. Hence, developers prefer other multi-threaded full-fledged web servers like Lighttpd and Mongrel for deploying their Rails applications.
See also
- Mongrel (web server)
- Apache
- nginx
- Lighttpd
