REST vs GRPC benchmark testing, gRPC performing very bad

Hi everyone

Context: I am making a simple benchmarking between REST and gRPC. I am runnning the test on 20 vu’s for 4 mins total with some timing conditions (attached the k6 script)

Test scenarios: k6, throttled network upto 100KbPS (using wondershaper) , server and client are hosted in aws

The results are very astonishing to me, The rest-api is performing as expected with iteration count of ~16/s and latency of ~1700s (p95). But, the grpc have iteration count of ~1.5/s whereas the latency is around ~60ms.

I have tested the same in a normal environment ( with no network throttling) i am having the same issue with iteration count of rest 3-4 times more than that of grpc. also the latency(p95) in REST(~19ms) is slightly better then gRPC(~21ms)

I am unable to figure out why am i getting these result,

i-> rest is outperforming grpc
ii-> throughput is so bad in grpc??

is it a k6 limitation or there something wrong in my scripts, I have searched a lot in internet but hard luck, Can you please guide me here?
Thanks in advanced

Link to the related scripts, results and codes : gRPC performing at nearly 50% of HTTP equivalent · Issue #1846 · grafana/k6 · GitHub