Menu

Two server at the same time

Help
2011-08-01
2013-05-04
  • Tomasz Zieleniewski

    Hi,

    Is it possible to start two servers simultaneusly, by placing to server block in the same script.
    I tried that but it seemed that the last defined was statred.

    Cheers
    Tomasz

     
  • Tomasz Zieleniewski

    I tried by providing the number of concurrent servers the test failed to start hangs
    Tue Aug 02 17:47:14 2011  run ts-19.htt
    SRV0-0 start on 0.0.0.0:8880

    I invoke server this way:
    SERVER 8880 2

    END

     
  • Nobody/Anonymous

    As many as you need :) But there are two different way to do that.

    SERVER 8081

    END

    SERVER 8082

    END

    Starts two server simultanious on two different ports. I have thest with up to 4 servers for failover testing of our reverse proxy without any problem.

    Or you can do it as you tried

    SERVER 8080 2

    END

    On accept a new server ist started. SERVER do not behave like CLIENT, a client would start simultaneusly 2 threads, server need an a incoming connection to start the thread.

    What you can do is the following

    CLIENT 2
    _RES localhost 8080
    __GET /trigger HTTP/1.1
    __
    _RES localhost 8080
    __GET /trigger HTTP/1.1
    __
    END

    SERVER 8080 2
    _RES
    _WAIT
    # and here you start with our script in two simultaneusly servers :)
    END

     

Log in to post a comment.