title: Redis is single-threaded, then how does it do concurrent I/O?
body: <p>Trying to grasp some basics of Redis I came across an interesting <a href="http://blog.kennejima.com/post/1226487020/thoughts-on-redis#" rel="noreferrer">blog post</a> .</p>
  
  <p>The author states:</p>
  
  <blockquote>
    <p>Redis is single-threaded with epoll/kqueue and scale indefinitely in terms of I/O concurrency. </p>
  </blockquote>
  
  <p>I surely misunderstand the whole threading thing, because I find this statement puzzling. If a program is single-threaded, how does it do anything concurrently? Why it is so great that Redis operations are atomic, if the server is single-threaded anyway?</p>
  
  <p>Could anybody please shed some light on the issue?</p>