title: Spring Boot Tomcat Configuration, migration from container to embedded
body: <p>I'm migrating a Spring boot application that used to run in the Tomcat container to a Spring Boot application that runs an embedded Tomcat.
  My old Tomcat configuration has these configurations in the server.xml:</p>
  
  <pre><code>&lt;Connector 
      executor="tomcatThreadPool"
      port="8080"
      protocol="org.apache.coyote.http11.Http11NioProtocol"
      acceptCount="500"
      acceptorThreadCount="2"
      maxThreads="150"
      maxHttpHeaderSize="32768"
      maxHeaderCount="256"
      connectionTimeout="20000"
      maxKeepAliveRequests="-1"
      redirectPort="8443"
      useComet="false"
      socket.appReadBufSize="87380"
      socket.rxBufSize="87380"
      socket.performanceConnectionTime="2"
      socket.performanceLatency="0"
      socket.performanceBandwidth="1"
      server="My server"
      /&gt;
  </code></pre>
  
  <p>I was able to set up most of the properties using a bean</p>
  
  <pre><code>@Bean
  public EmbeddedServletContainerFactory embeddedServletContainerFactory() {
      TomcatEmbeddedServletContainerFactory tomcatEmbeddedServletContainerFactory = new TomcatEmbeddedServletContainerFactory();
      tomcatEmbeddedServletContainerFactory.setProtocol("org.apache.coyote.http11.Http11Nio2Protocol");
      tomcatEmbeddedServletContainerFactory.addConnectorCustomizers((TomcatConnectorCustomizer) connector -&gt; {
          AbstractHttp11JsseProtocol&lt;Nio2Channel&gt; handler = (AbstractHttp11JsseProtocol)connector.getProtocolHandler();
          handler.setMaxKeepAliveRequests(-1);
          handler.setAcceptorThreadCount(2);
          handler.setMaxHeaderCount(256);
          connector.setRedirectPort(8443);
      });
  
      return tomcatEmbeddedServletContainerFactory;
  }
  </code></pre>
  
  <p>And application.xml properties:</p>
  
  <pre><code>server.tomcat.accept-count = 500
  server.tomcat.max-threads = 600
  server.port = 8080
  server.max-http-header-size = 32768
  server.connection-timeout = 20000
  </code></pre>
  
  <p>However I cannot figure out how to set this part</p>
  
  <pre><code>useComet="false"
  socket.appReadBufSize="87380"
  socket.rxBufSize="87380"
  socket.performanceConnectionTime="2"
  socket.performanceLatency="0"
  socket.performanceBandwidth="1"
  server="My server"
  </code></pre>
  
  <p>Can anyone help me please?
  Thank you</p>