3 ms·
One of the biggest advantages of JWT is that is saves up on database reads which can be significant when you have million+ logged in users. I think that is pro
by superasn 8y ago
One of the biggest advantages of JWT is that is saves up on database reads which can be significant when you have million+ logged in users.
I think that is probably thinking of time when you had to do everything yourself (host your own mysql server, create indexes, cache, etc). Now you can easily save your sessions using stuff like DynamoDb.. it costs almost nothing and read times are blazing fast even when there are millions of rows. Doesn't make a lot of sense to use JWT after this.
- amenod 8y ago> Now you can easily save your sessions... True. > ...using stuff like DynamoDb.. Well, yeah, if you want to be tied to AWS and use a difficult to manage technology which is only useful in a few niche cases, DynamoDB is absolutely the right choice </sarcasm>. Otherwise Redis, Memcache or even Postgres would be a better choice. After all, session management is only a (small) part of data persistence problem.
- superasn 8y agoYes of course. That was not my point DynamoDb was just something off the top of my head. You can easily use redis or even any nosql db for that. My point was about the main advantages of JWT being fast with millions of users isn't really that big deal anymore.
- amenod 8y agoCool, sorry if I jumped the gun... I recently had to deal with some SW using DynamoDB for no special reason, so I'm a bit touchy about it. :)