SFIDE

7 frequent challenges with Redis/MongoDB

Using MongoDB™ with Redis can enhance performance, but the combination adds significant complexity and might introduce more challenges. Because Redis lacks some features, it often needs additional modules that further complicate the setup.

CARATTERISTICHE

Key features of Couchbase vs. Redis + MongoDB

  • Cosa è incluso
  • Built-in cache
  • Flessibilità JSON
  • Automatic mobile sync and peer-to-peer sync
  • Masterless architecture
  • Full SQL querying
  • Multi-master geographic replication
  • Analisi
  • Automatic sharding/partitioning
  • Logica del database
  • Built-in full-text search
  • Data structures (queue, set, etc.)
  • Scala multidimensionale
  • Couchbase
  • controllo
  • controllo
  • controllo
  • controllo
  • controllo
  • controllo
  • controllo
  • controllo
  • Eventing, UDFs
  • controllo
  • controllo
  • controllo
  • Redis + MongoDB
  • Redis only
  • Requires RedisJSON module
  • cancle
  • cancle
  • cancle
  • cancle
  • MongoDB only
  • cancle
  • Redis is Lua only
  • cancle
  • controllo
  • cancle
CLIENTI

Success stories: Couchbase over MongoDB and Redis

  • "With less than half the servers, we can increase performance and gain a much better scalable architecture."
    Amir Ish-Shalom, Direttore senior delle operazioni, Viber
    15 miliardi di chiamate e messaggi al giorno
    60% riduzione dei server totali
  • "La cosa più importante è la scalabilità multidimensionale. Avere pochi nodi per un caso d'uso specifico è molto potente".
    Jay Duraisamy, SVP, USIS Engineering Leader, Equifax
    300+ milioni di documenti in 40 minuti
    1.5 miliardi di record in continua evoluzione
  • “None of the other solutions came even close to Couchbase’s broad enterprise capabilities.”
    Aviram Agmon, CTO, Maccabi Health Care
    2.3 2.3 million customers on a single app
    0 tempi di inattività per migliaia di connessioni giornaliere
CODE SNIPPET

Couchbase's SQL++ and single API excels over Redis/MongoDB


// scope/collection allow for more flexible data organization
const bucket = cluster.bucket('accounts-receivable');
const scope = bucket.scope('tenant1');
const collection = scope.collection('invoices');
const result = await collection.get('key');

// Redis lacks scope and collection capability
const redisClient = redis.createClient({ ... });
redisClient.connect();
const value = await redisClient.get('key');


/* equivalent to the Mongo example */
SELECT SUM(value * volume) AS val, symbol
FROM   db.stocks
WHERE  symbol IN ( "AAPL", "GOOG" ) AND value > 0
GROUP  BY symbol
ORDER  BY val DESC, symbol ASC



// equivalent to the SQL++ example
db.stocks.aggregate([
	 { "$match": {
	 	 "$and": [
	 	 	 {"symbol": {
	 	 	 	 "$in": [
	 	 	 	 "AAPL",
	 	 	 	 "GOOG"]}},
	 	 	 { "value": {
	 	 	 "$gt": 0 }}]}},
	 { "$group": {
	 	 "_id": {
	 	 	 "symbol": "$symbol" },
	 	 "sum(value * volume)": {
	 	 	 "$sum": {
	 	 	 	 "$multiply": [
	 	 	 	 	 "$value",
	 	 	 	 	 "$volume"]}}}},
	 { "$project": {
	 	 "_id": 0,
	 	 "sum(value * volume)": "$sum(value * volume)",
	 	 "symbol": "$_id.symbol"}}
	 { "$sort": {
	 	 "sum(value * volume)": -1,
	 	 "symbol": 1 }}]})


// Redis lacks a complex query language like SQL


DBaaS performance report

See how Redis and MongoDB Atlas compare to Couchbase Capella™.

Iniziare a costruire

Consultate il nostro portale per sviluppatori per esplorare NoSQL, sfogliare le risorse e iniziare con le esercitazioni.

Utilizzare Capella gratuitamente

Per iniziare a lavorare con Couchbase bastano pochi clic. Capella DBaaS è il modo più semplice e veloce per iniziare.

Contattate

Volete saperne di più sulle offerte di Couchbase? Lasciatevi aiutare.