twitter / pelikan

Pelikan is Twitter's unified cache backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multithreading in Pelikan

Kaiweitu opened this issue · comments

Hi there,

I am currently studying and looking into Pelikan's code. From what I have learned so far from the source code, it seems to me that one cache instance only spawns one worker thread. So I want to ask whether Pelikan only support single-threading? or do I miss some part of the code? I would really appreciate the help!

Thanks

Hi @Kaiweitu -

You are correct, that there is only one worker thread in the C implementations. So requests on established sessions will all be handled by a single thread. Scaling can happen horizontally by having the client distribute requests across multiple server instances.

The experimental Rust implementation of Segcache does have multi-threaded request handling, but it is not quite production ready yet. We hope to wrap up the work on the Rust implementation and continue development of Pelikan in Rust.

Hope this helps answer your question!

Thanks! That's really helpful.

@Kaiweitu - would it be okay to close this issue?