Database per Service Pattern in Microservices

  Рет қаралды 12,191

Arpit Bhayani

Arpit Bhayani

Күн бұрын

Пікірлер: 22
@JatinDholakia
@JatinDholakia 2 жыл бұрын
Great video. Another disadvantage is performing joins across databases. It has to happen on network and increases latency.
@AsliEngineering
@AsliEngineering 2 жыл бұрын
Oh yes. Forgot to cover that. Had that point in mind. Thanks for adding. Pinning your comment.
@suryansh70
@suryansh70 2 жыл бұрын
Nice explaination + great visuals u raised the level bro
@simplygaurav07
@simplygaurav07 Жыл бұрын
Great explanation. Thank you
@dhavin6322
@dhavin6322 2 жыл бұрын
super clear explanation. Thanks
@abdulmoizsheikh8031
@abdulmoizsheikh8031 2 жыл бұрын
Hi. Good stuff. Can you tell why cassandra was chosen for the chat service? Thanks!
@AsliEngineering
@AsliEngineering 2 жыл бұрын
Just an example. Could have gone for any partitioned db.
@sakshamjain16
@sakshamjain16 Жыл бұрын
IMHO Cassandra is optimized for writes. And our chat service will be write heavy because when any new message is created it will be sent to receiver over websockets or SSE or any other tech and parallelly it will be written to DB. So reads are actually not happening on chat messages in DB.
@waleedahmad2012
@waleedahmad2012 Жыл бұрын
this was great
@jivanmainali1742
@jivanmainali1742 2 жыл бұрын
So is database per service is like single collection/table for each services?
@AsliEngineering
@AsliEngineering 2 жыл бұрын
A separate DB server per service.
@jivanmainali1742
@jivanmainali1742 2 жыл бұрын
@@AsliEngineering yeah but let say we have 100 gb data spread over 10 collection equally so when we follow database per service for our 10 services is it 10 gb of data or we all service still has all data.
@jabedzaman
@jabedzaman 8 ай бұрын
how do we achieve the thing about relations like my post microservice will have the post and user id and my auth service is having the user table... in short what i want to ask is in monolithic we have a single db so we can use a refrence to user table and post table to avoid making post with user id that doesnt exist... but how to do in a microservice arch??? cause we have seperate db
@AsliEngineering
@AsliEngineering 8 ай бұрын
Cross node ref keys are expensive to implement and it is something that application logic needs to handle when databases do not offer it out of the box. Hence in microservices setup people do not implement them.
@jabedzaman
@jabedzaman 8 ай бұрын
@AsliEngineering I am continuing by adding an auth guard at my api gateway will that be considered as good idea? I considered about adding something to communicate between my other service and Auth one to validate user id but I felt this may turn out to increase latency
@AsliEngineering
@AsliEngineering 8 ай бұрын
@@jabedzaman yes it will shoot up the latency. Evaluate if you really need this check. What if you don't have it. Would this be a problem.
@jabedzaman
@jabedzaman 8 ай бұрын
@AsliEngineering I am making an cloud suite sort of thing I just wanted to assure that my upload table doesn't have unnecessary record for user which doesn't exists... like in general it should not be but just trying to avoid in case if there turns out to be some vulnerability... just implementing an auth guard (kinda a middleware) in my api gateway so only valid authenticated user can use other service... hopefully this works out right?
@AsliEngineering
@AsliEngineering 8 ай бұрын
@@jabedzaman yes. It would work.
@jivanmainali1742
@jivanmainali1742 2 жыл бұрын
Is encryption done in db or we have to manage it seperatly?
@AsliEngineering
@AsliEngineering 2 жыл бұрын
Encryption at rest is done by DB
@abdulmoizsheikh8031
@abdulmoizsheikh8031 2 жыл бұрын
Cloud services like amazon RDS offers encryption at rest out of the box
Why do databases store data in B+ trees?
29:43
Arpit Bhayani
Рет қаралды 42 М.
API Composition Pattern in Microservices
25:50
Arpit Bhayani
Рет қаралды 8 М.
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 142 МЛН
Wait for the last one 🤣🤣 #shorts #minecraft
00:28
Cosmo Guy
Рет қаралды 23 МЛН
Try Not To Laugh 😅 the Best of BoxtoxTv 👌
00:18
boxtoxtv
Рет қаралды 7 МЛН
Microservices with Databases can be challenging...
20:52
Software Developer Diaries
Рет қаралды 82 М.
Handling timeouts in a microservice architecture
23:38
Arpit Bhayani
Рет қаралды 21 М.
Shared Database Pattern in Microservices
21:21
Arpit Bhayani
Рет қаралды 16 М.
Backend for Frontend Pattern in Microservices
29:02
Arpit Bhayani
Рет қаралды 17 М.
Saga Pattern | Distributed Transactions | Microservices
17:18
Introduction to NoSQL databases
26:18
Gaurav Sen
Рет қаралды 781 М.
Database Sharding and Partitioning
23:53
Arpit Bhayani
Рет қаралды 94 М.
Subscribe for more Coding Tips!🔥 #aitools #codingcomplex #codinglife #program #aicoding
0:28
Claude Ams - Programming Guru 💻
Рет қаралды 11 МЛН
Samsung displays 💀💀 #blowup #samsung #edit #foryou
0:22
skullmaxx
Рет қаралды 31 МЛН