Personally I think Redis is the right solution for this since all you are doing is caching. You don't need all the data safety that postgres supplies. And that is what that performance difference is about. Redis is a wonderful tool for a great many things, but it will loose data even if you are syncing, plus look at the memory requirements of the sync to disk.
There are number of the factors here that make this an invalid comparious. You say you are caching json, but that's not what it looks like to me. It looks like MsgPack in Redis, a Table in postgres. Postgres has a JSON field, and you could just as easily use that with an indexed key. Or you cold us a blob field and serialize MsgPack into it then look it up by key like you do in redis. You'd get better performance.
Redis priority is performance. PostgreSQL priority is data integrity. Use the right tool for the job, but please don't compare apples to oranges and talk about x times multipliers.
Comment
Personally I think Redis is the right solution for this since all you are doing is caching. You don't need all the data safety that postgres supplies. And that is what that performance difference is about. Redis is a wonderful tool for a great many things, but it will loose data even if you are syncing, plus look at the memory requirements of the sync to disk.
There are number of the factors here that make this an invalid comparious. You say you are caching json, but that's not what it looks like to me. It looks like MsgPack in Redis, a Table in postgres. Postgres has a JSON field, and you could just as easily use that with an indexed key. Or you cold us a blob field and serialize MsgPack into it then look it up by key like you do in redis. You'd get better performance.
Redis priority is performance. PostgreSQL priority is data integrity. Use the right tool for the job, but please don't compare apples to oranges and talk about x times multipliers.