Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

High-performance HTTP or other server?

I'm writing a service that keeps in memory a data structure that can be queried somewhat like a hash table and it needs an API that works over the network. It can only run on a single machine due to needing a global view of all the data. The service that needs to query it currently handles about 20k req/s, but it can sometimes get up to 50k and we've seen 100k req/s a few times per year.

My question: Is there an HTTP server library that can handle such throughput or do I need to go with raw TCP? The data structure itself can handle about 1M lookups / sec on a standard server, so I'm basically performance bound by the server library. I want to avoid having to write a bunch of servers that have no chance of performing fast enough.

Some extra info:

  1. The number of clients is a small bounded number.
  2. I can rearchitect the clients to open persistent connections if needed.

Most of our code is Java, so that is the preferred language and the data structure has an implementation in Java. However, I'm also fine with rewriting in C++, Go or Rust if there are higher performing HTTP libraries that can do this.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...