Tomcat has such a property named server.tomcat.max-connections already. We should add one for Jetty, too. We can use the ConnectionLimit class for limiting the connections.