Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18366

Jetty should be used rather than Winstone for embedded deployments

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      Hudson recently switched to using Jetty as an embedded servlet engine. It has a very small size, and very very good performance.
      Put bluntly, the current use of Winstone SUCKS, and due to its threaded design will cause performance to slow to a crawl at 240+ requests a minute even on high end hardware with aggressive varnish caching. At the same time using an external Java EE container isn't that easy, so by following hudson and switching to Jetty we get the best of both worlds.

      Thanks
      md_5

          [JENKINS-18366] Jetty should be used rather than Winstone for embedded deployments

          Michael D created issue -

          Winstone has ceased the development upstream, so we are the one maintaining it. That obviously doesn't make sense.

          Another benefit is that this would also allow us to start delivering features that depend on WebSockets, etc.

          This work involves writing a new driver code that accepts options that Winstone accepts but instead drive Jetty. For this purpose, I have refactored Winstone to explicitly list up all the options in use.

          The general option compatibility is important so as not to disrupt existing deployments, even if we might consciously decide to skip some uncommon options if those are deemed too hard to match.

          Kohsuke Kawaguchi added a comment - Winstone has ceased the development upstream, so we are the one maintaining it. That obviously doesn't make sense. Another benefit is that this would also allow us to start delivering features that depend on WebSockets, etc. This work involves writing a new driver code that accepts options that Winstone accepts but instead drive Jetty. For this purpose, I have refactored Winstone to explicitly list up all the options in use . The general option compatibility is important so as not to disrupt existing deployments, even if we might consciously decide to skip some uncommon options if those are deemed too hard to match.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          pom.xml
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/b19f4650d7cc146e28398a33ad0625d46991e27f
          Log:
          [FIXED JENKINS-18366] Winstone is now powered by Jetty

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html pom.xml war/pom.xml http://jenkins-ci.org/commit/jenkins/b19f4650d7cc146e28398a33ad0625d46991e27f Log: [FIXED JENKINS-18366] Winstone is now powered by Jetty
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2925
          [FIXED JENKINS-18366] Winstone is now powered by Jetty (Revision b19f4650d7cc146e28398a33ad0625d46991e27f)

          Result = SUCCESS
          kohsuke : b19f4650d7cc146e28398a33ad0625d46991e27f
          Files :

          • war/pom.xml
          • pom.xml
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #2925 [FIXED JENKINS-18366] Winstone is now powered by Jetty (Revision b19f4650d7cc146e28398a33ad0625d46991e27f) Result = SUCCESS kohsuke : b19f4650d7cc146e28398a33ad0625d46991e27f Files : war/pom.xml pom.xml changelog.html
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-20074 [ JENKINS-20074 ]

          Could you please add this to the next LTS including --spdy option?

          Ireneusz Makowski added a comment - Could you please add this to the next LTS including --spdy option?

          Dennys Hsieh added a comment -

          I use "java -jar jenkins.war" to run a new 1.536, it works. Ant it extract the war into the temp directory.
          And I stop it by Ctrl-C, I found most files in the above temp are deleted except webapp\WEB-INF\lib.
          Then I try to run it again, I don't see the extract log and I use browser to connect to Jenkins and only see the directory and file under the Jenkins directory.

          Do I need to do any configuration for Jetty 8 ?

          Dennys Hsieh added a comment - I use "java -jar jenkins.war" to run a new 1.536, it works. Ant it extract the war into the temp directory. And I stop it by Ctrl-C, I found most files in the above temp are deleted except webapp\WEB-INF\lib. Then I try to run it again, I don't see the extract log and I use browser to connect to Jenkins and only see the directory and file under the Jenkins directory. Do I need to do any configuration for Jetty 8 ?

          Matthias Rump added a comment - - edited

          I see the same problem as Dennys in 1.537.
          Even if I enforce the JENKINS_HOME environment variable using

          >>java -DJENKINS_HOME=/path/to/jenkins_home/ -jar jenkins.war

          the files are extracted into the users temp directory and jenkins can only be started sucessfully ONCE.

          Every following startup hangs.

          Matthias Rump added a comment - - edited I see the same problem as Dennys in 1.537. Even if I enforce the JENKINS_HOME environment variable using >>java -DJENKINS_HOME=/path/to/jenkins_home/ -jar jenkins.war the files are extracted into the users temp directory and jenkins can only be started sucessfully ONCE. Every following startup hangs.

          Matthias Rump added a comment -

          migration to jetty seem to ignore JENKINS_HOME

          Matthias Rump added a comment - migration to jetty seem to ignore JENKINS_HOME
          Matthias Rump made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            Unassigned Unassigned
            md_5 Michael D
            Votes:
            10 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: