Sorry, I did not include those calls due to it being called in a standard
method:


func submit(rpc *client.Rpc, payload *trc.Tr) error {
    ctx, cancel := context.WithDeadline(context.Background(),
time.Now().Add(100 * time.Millisecond))
    defer cancel()
    reply, err := rpc.Client.ConsumeNow(ctx, payload)
if err != nil {
return err
}
    return nil
}


There is nothing fancy going on, just a bunch of calls being made similar
to above (1 to 1 with a web request). I've noticed that under no load the
delay is 1ms or less, it is as load increases it just gets exponentially
worse.

the full request chain would look similar to the following:

web request -> request handler -> some work to generate rpc data -> rpc
call (above code) -> return data back to handler

the only time I am measuring is the time within the <rpc call> block:

func submit(rpc *client.Rpc, payload *trc.Tr) error {
    ctx, cancel := context.WithDeadline(context.Background(),
time.Now().Add(100 * time.Millisecond))
    defer cancel()
    start := time.Now()
    reply, err := rpc.Client.ConsumeNow(ctx, payload)
    end := time.Since(start)
if err != nil {
return err
}
    return nil
}

I hope this helps

On Tue, Sep 20, 2016 at 7:38 PM, Qi Zhao <zh...@google.com> wrote:

> Your client code seems incomplete (there is no code sending rpcs). Can you
> share the real code you used to get that latency numbers?
>
>
> On Thursday, September 15, 2016 at 7:48:54 AM UTC-7,
> ew...@grandslammedia.com wrote:
>>
>> I've attached a few pastebins of code samples:
>>
>> proto file: http://pastebin.com/F0QaTW14
>> server: http://pastebin.com/rL1YxffU
>> client: http://pastebin.com/fu69Jbkn
>>
>> All being accessed via respective functions, those seen in the server (in
>> the return) all finish in under 1ms (measured)
>>
>> On Thursday, September 15, 2016 at 12:06:22 AM UTC-4, Nathaniel Manista
>> wrote:
>>>
>>> On Wed, Sep 14, 2016 at 10:25 AM, <ew...@grandslammedia.com> wrote:
>>>
>>>> I am trying to send many requests over gRpc, however am running into
>>>> very  poor performance under simulated load via. wrk with a 100ms rpc
>>>> request deadline.
>>>>
>>>> - ubuntu 14.04 x86
>>>> - go1.6.2
>>>> - 1 Connection being handled via. gRpc
>>>> - The operation being performed on the server end is always less than
>>>> 1ms
>>>> - gRpc time is anywhere from 30-500ms
>>>> - this test is performed with both client / server on the same machine
>>>>
>>>> I attempted a loosely handled open / close connection method which
>>>> appeared to give a more stable overall time (3-150ms).
>>>>
>>>> I am aiming for sub 100ms at all times.
>>>>
>>>
>>> Are you able to share with us the code you've written that is performing
>>> as you have described?
>>> -Nathaniel
>>>
>>


-- 


[image: skype.png]ewan.adnium

[image: email.png]e...@grandslammedia.com

[image: phone.png]+1 416 666 4479 <callto:+4166664479>

[image: gsm.png]Visit Grand Slam Media <http://grandslammedia.com/>

[image: work.png]56 The Esplanade, Suite 220, Toronto ON M5E 1A7

[image: maps.png]Find us on Google Maps
<https://www.google.ca/maps/place/56+The+Esplanade+%23220,+Toronto,+ON+M5E+1A6/@43.6471037,-79.3741972,17z/data=!3m1!4b1!4m2!3m1!1s0x89d4cb2e7237dacd:0x1ecfac17799596aa>


Confidentiality Note: This e-mail and any attachments are confidential and
may be protected by legal privilege.

If you are not the intended recipient, be aware that any disclosure,
copying, distribution or use of this e-mail or any attachment is
prohibited. If you have received this e-mail in error, please notify us
immediately by returning it to the sender and delete this copy from your
system Thank you for your cooperation.

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CACc3THzsrzxgbgsfRi%3DGos5_stjD%3Dd2og4KF2NLg0fCSrV10fA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to