Code Monkey home page Code Monkey logo

rpc-frameworks-performance-pk's Introduction

RPC frameworks performance PK

If you care about the performance of the RPC frameworks, this PK can save you time. Yes, I spend a lot of time in this area, but now you do not having to.

Prepare

This PK requires Redis. If you haven't installed it, please perform the following steps to install it in docker.

1. Install Docker (Docker CE recommended)

2. Install Redis in Docker
1) Install: docker pull redis
2) Start: docker run --restart=always --name redis -d -p 6379:6379 -it redis redis-server

Install

git clone https://github.com/hiowenluke/rpc-frameworks-performance-pk rpc-pk
cd rpc-pk
npm install

Run

node index.js

This will do the following for each RPC framework:

1. Start the server
2. In the client, call the remote function and get the result
3. Perform the 2nd step 10000 times

Results

...
========================================
Results
========================================
native-socket 10517 times/sec
booms         9700  times/sec
sofa-rpc-node 3071  times/sec
gRPC-node     2853  times/sec
socket.io     786   times/sec
========================================
Platform info:
macOS Mojave 10.14 x64
Intel(R) Core(TM) i7-4558U CPU @ 2.80GHz x 4
Total Memory 16 GB
Node.js v10.16.3
V8 6.8.275.32-node.54

The results is on my pc. It will be different on yours, but it does not affect the ranking here.

Note

By default, sofa-rpc-node and the RPC which based on socket.io do not participate in the pk. If you wanna them to join in, uncomment them in ./benchmarks/index.js before run this PK.

For sofa-rpc-node, you should install ZooKeeper first, such as on mac:

brew install zookeeper

Conclusion

Booms is a high-performance RPC framework, much faster than gRPC-node and sofa-rpc-node.

License

MIT

Copyright (c) 2019, Owen Luke

rpc-frameworks-performance-pk's People

Contributors

hiowenluke avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.