FAQ
I have a requirement and want to check whether there are already anything
out there.

Normally, reverse proxy will forward requests to one server, or load
balance to multiple servers but still just forward one request to one
server. I want to clone the requests, send to two servers, one production
server and one benchmarking server, and return results from production
server, ignoring results from the benchmarking server.

This would be a good tool to test new systems. With some modification, we
can use this to pick fastest result from one of the two servers.

Chris

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Naitik Shah at Sep 24, 2013 at 10:00 pm
    http://golang.org/pkg/io/#MultiWriter maybe?
    On Tue, Sep 24, 2013 at 2:42 PM, ChrisLu wrote:
    I have a requirement and want to check whether there are already anything
    out there.

    Normally, reverse proxy will forward requests to one server, or load balance
    to multiple servers but still just forward one request to one server. I want
    to clone the requests, send to two servers, one production server and one
    benchmarking server, and return results from production server, ignoring
    results from the benchmarking server.

    This would be a good tool to test new systems. With some modification, we
    can use this to pick fastest result from one of the two servers.

    Chris

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.


    --
    -Naitik

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Kyle Lemons at Sep 24, 2013 at 10:03 pm
    If you don't need to wait for the bench server, you can probably just send
    off a parallel request in its own goroutine from the Director hook.

    On Tue, Sep 24, 2013 at 2:42 PM, ChrisLu wrote:

    I have a requirement and want to check whether there are already anything
    out there.

    Normally, reverse proxy will forward requests to one server, or load
    balance to multiple servers but still just forward one request to one
    server. I want to clone the requests, send to two servers, one production
    server and one benchmarking server, and return results from production
    server, ignoring results from the benchmarking server.

    This would be a good tool to test new systems. With some modification, we
    can use this to pick fastest result from one of the two servers.

    Chris

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • ChrisLu at Sep 24, 2013 at 10:15 pm
    Thanks for the tip. I also need to clone the http request. Current
    http.Request.Body is just ReadCloser. The same request can not be used
    twice.

    The MultiWriter is handy to clone the request.

    Chris
    On Tuesday, September 24, 2013 3:03:33 PM UTC-7, Kyle Lemons wrote:

    If you don't need to wait for the bench server, you can probably just send
    off a parallel request in its own goroutine from the Director hook.


    On Tue, Sep 24, 2013 at 2:42 PM, ChrisLu <[email protected] <javascript:>>wrote:
    I have a requirement and want to check whether there are already anything
    out there.

    Normally, reverse proxy will forward requests to one server, or load
    balance to multiple servers but still just forward one request to one
    server. I want to clone the requests, send to two servers, one production
    server and one benchmarking server, and return results from production
    server, ignoring results from the benchmarking server.

    This would be a good tool to test new systems. With some modification, we
    can use this to pick fastest result from one of the two servers.

    Chris

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected] <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • ChrisLu at Sep 25, 2013 at 12:11 am
    Golang rocks! Here is my initial version, and it works fine! Talk about
    productivity!

       https://github.com/chrislusf/tee-proxy

    Chris
    On Tuesday, September 24, 2013 3:15:25 PM UTC-7, ChrisLu wrote:

    Thanks for the tip. I also need to clone the http request. Current
    http.Request.Body is just ReadCloser. The same request can not be used
    twice.

    The MultiWriter is handy to clone the request.

    Chris
    On Tuesday, September 24, 2013 3:03:33 PM UTC-7, Kyle Lemons wrote:

    If you don't need to wait for the bench server, you can probably just
    send off a parallel request in its own goroutine from the Director hook.

    On Tue, Sep 24, 2013 at 2:42 PM, ChrisLu wrote:

    I have a requirement and want to check whether there are already
    anything out there.

    Normally, reverse proxy will forward requests to one server, or load
    balance to multiple servers but still just forward one request to one
    server. I want to clone the requests, send to two servers, one production
    server and one benchmarking server, and return results from production
    server, ignoring results from the benchmarking server.

    This would be a good tool to test new systems. With some modification,
    we can use this to pick fastest result from one of the two servers.

    Chris

    --
    You received this message because you are subscribed to the Google
    Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dave Cheney at Sep 25, 2013 at 12:14 am
    Umm, error handling ?
    On Wed, Sep 25, 2013 at 10:10 AM, ChrisLu wrote:
    Golang rocks! Here is my initial version, and it works fine! Talk about
    productivity!

    https://github.com/chrislusf/tee-proxy

    Chris

    On Tuesday, September 24, 2013 3:15:25 PM UTC-7, ChrisLu wrote:

    Thanks for the tip. I also need to clone the http request. Current
    http.Request.Body is just ReadCloser. The same request can not be used
    twice.

    The MultiWriter is handy to clone the request.

    Chris
    On Tuesday, September 24, 2013 3:03:33 PM UTC-7, Kyle Lemons wrote:

    If you don't need to wait for the bench server, you can probably just
    send off a parallel request in its own goroutine from the Director hook.

    On Tue, Sep 24, 2013 at 2:42 PM, ChrisLu wrote:

    I have a requirement and want to check whether there are already
    anything out there.

    Normally, reverse proxy will forward requests to one server, or load
    balance to multiple servers but still just forward one request to one
    server. I want to clone the requests, send to two servers, one production
    server and one benchmarking server, and return results from production
    server, ignoring results from the benchmarking server.

    This would be a good tool to test new systems. With some modification,
    we can use this to pick fastest result from one of the two servers.

    Chris

    --
    You received this message because you are subscribed to the Google
    Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • ChrisLu at Sep 25, 2013 at 12:24 am
    Right... for now I just used "recovery". I met with error "invalid memory
    address or nil pointer dereference" inside net/dial.go

    Chris
    On Tuesday, September 24, 2013 5:14:44 PM UTC-7, Dave Cheney wrote:

    Umm, error handling ?

    On Wed, Sep 25, 2013 at 10:10 AM, ChrisLu <[email protected] <javascript:>>
    wrote:
    Golang rocks! Here is my initial version, and it works fine! Talk about
    productivity!

    https://github.com/chrislusf/tee-proxy

    Chris

    On Tuesday, September 24, 2013 3:15:25 PM UTC-7, ChrisLu wrote:

    Thanks for the tip. I also need to clone the http request. Current
    http.Request.Body is just ReadCloser. The same request can not be used
    twice.

    The MultiWriter is handy to clone the request.

    Chris
    On Tuesday, September 24, 2013 3:03:33 PM UTC-7, Kyle Lemons wrote:

    If you don't need to wait for the bench server, you can probably just
    send off a parallel request in its own goroutine from the Director
    hook.
    On Tue, Sep 24, 2013 at 2:42 PM, ChrisLu wrote:

    I have a requirement and want to check whether there are already
    anything out there.

    Normally, reverse proxy will forward requests to one server, or load
    balance to multiple servers but still just forward one request to one
    server. I want to clone the requests, send to two servers, one
    production
    server and one benchmarking server, and return results from
    production
    server, ignoring results from the benchmarking server.

    This would be a good tool to test new systems. With some
    modification,
    we can use this to pick fastest result from one of the two servers.

    Chris

    --
    You received this message because you are subscribed to the Google
    Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it,
    send
    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected] <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 24, '13 at 9:42p
activeSep 25, '13 at 12:24a
posts7
users4
websitegolang.org

People

Translate

site design / logo © 2023 Grokbase