SCALE OUT • Many workers doing the same thing • No SPOF • Growing is more easy • Introduce best practice SCALE UP • 1 Fat instance • 1 Fat application • SPOF (single point of failure) • Hard to maintain • Always has a limit • Short term meaning
needs Do I need atomicity of requests ? Do I need concurrent access ? Do I mostly read or write ? Do I need relational ? Do I need big storage capacity ? Do I need high availability ?
small quantity of data • DB have to manage data TTL No, I have to do it manually • Data model : K/V No, PG is relational (mainly) • Multiple writes at the same time No, PG is Atomic • High availability PG is awesome ;-) Use of PG bouncer or similar allow good clustering I need to store sessions QUICK EXAMPLE
small quantity of data • DB have to manage data TTL Yes Redis can do it • Data model : K/V Yes • Multiple writes at the same time No, redis is pseudo Atomic (master/slave) • High availability Redis is great, but cauterization is rude… I need to store sessions QUICK EXAMPLE
small quantity of data • DB have to manage data TTL Yes redis can do it • Data model : K/V Yes • Multiple writes at the same time OK, this is possible with memcached protocol • High availability Clustering is built in, no downtime J I need to store sessions QUICK EXAMPLE
POSIX compliant • POSIX is ACID • POSIX is powerful but is bottleneck • File System is nightmare of ops • File System is create coupling (host provider/OS/language) • Free SPOF multi tenant File System is a unicorn STORE IN DATABASE, OR DATASTORE LIKE S3 (AWS) DEDICATED TO FILE MANAGEMENT