Building Microservices with Node, Docker and Nginx pt 1 - What is a Microservice?

  Рет қаралды 73,576

Fredrik Christenson

Fredrik Christenson

Күн бұрын

In "Building Microservices with Node, Docker and Nginx pt 1 - What is a Microservice?" I walk you through what a Microservice is and what this 3 part tutorial will show you.
Here is the code:
github.com/fChristenson/micro...

Пікірлер: 84
@matthewzecchini9951
@matthewzecchini9951 4 жыл бұрын
2 years later and still valuable
@ransadasdoamdahsdasdlasd
@ransadasdoamdahsdasdlasd 3 жыл бұрын
3 years and still valuable
@safiqlodi834
@safiqlodi834 3 жыл бұрын
4 years
@hyperocket3279
@hyperocket3279 5 жыл бұрын
" but you can also remove ants with a nuclear bomb " 😂😂😂 i love this
@safiqlodi834
@safiqlodi834 3 жыл бұрын
Thank you for this valuable piece of information. You cannot imagine, how helpful your efforts are for us. God Bless!
@developerjas
@developerjas 3 жыл бұрын
Best Video on microservices so far that I can find on the internet. Thanks
@nicklansbury3166
@nicklansbury3166 6 жыл бұрын
That was presented in a very clear manner. Thank you. I am now moving on to part 2.
@FredrikChristenson
@FredrikChristenson 6 жыл бұрын
Thank you, I am very happy that you liked it m8! Have a great day!
@busyrand
@busyrand 4 жыл бұрын
I love this channel! This content is really going to help me level up with understanding.
@ionutale1950
@ionutale1950 5 жыл бұрын
man, this video is amazing !!! don't give up on making video, you bring what is missing to the js world. also you have a way of talking that don't annoy people like other youtubers do. this video is clean, clear and simple ! don't worry about opinions...
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
Thank you m8! My videos are not about channel growth, they are about education. Have a great day and thank you so much for watching!
@tusharshukla4362
@tusharshukla4362 4 жыл бұрын
@@FredrikChristenson Awesome man. Keep up the good work. Looking forward to see more content from you.
@Korudo
@Korudo Жыл бұрын
This is great. I definitely appreciate this series a ton.
@user-te1mw9zc4k
@user-te1mw9zc4k 6 жыл бұрын
A very good kick off for micro service with docker. Well done.
@FredrikChristenson
@FredrikChristenson 6 жыл бұрын
Thank you! Have a great day and thank you so much for watching!
@raduprodan1949
@raduprodan1949 6 жыл бұрын
The best tutorial on Microservices with Node and Docker.
@FredrikChristenson
@FredrikChristenson 6 жыл бұрын
Hi m8! Thank you, I am very flattered that you feel this way. Have a great day!
@marjaysonsanagustin
@marjaysonsanagustin 6 жыл бұрын
Agreed
@nssharmassj
@nssharmassj 5 жыл бұрын
Wow man I Loved how simple explanation was ! That's what we want as a learner. Good and simple example explanation. I subscribed you right after watching 1st video. Keep making more videos like this.
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
Glad you enjoyed it m8! Have a great day and thank you so much for watching!
@manueldiera6781
@manueldiera6781 4 жыл бұрын
Extremely useful, thanks so much!
@johnhatami4752
@johnhatami4752 4 жыл бұрын
excellent videos! it helped me tremendously!
@rizkiheryandi5759
@rizkiheryandi5759 5 жыл бұрын
You're just got a new loyal subscriber sir, thank you for great content
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
Hi Rizki! I feel very flattered that you enjoy my little hobby m8, have a great day! Have a great day and thank you so much for watching!
@rizkiheryandi5759
@rizkiheryandi5759 5 жыл бұрын
@@FredrikChristenson there's a bot for reply KZbin comment ?, Because you replied my comment very fast and the replied it's not relevant with my comment I think 😆
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
It's actually me m8, I try to reply as often I can.
@nicolasparada
@nicolasparada 5 жыл бұрын
Really good explanation. Thanks :)
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
No worries m8, glad to hear that you enjoyed the video. Have a great day and thank you so much for watching!
@restuwahyusaputra7764
@restuwahyusaputra7764 3 жыл бұрын
Very cool I like this tutorial, easy to understand, terimakasih.
@mohamedhajr5370
@mohamedhajr5370 6 жыл бұрын
thanks alot this is really awesome! keep it up.
@FredrikChristenson
@FredrikChristenson 6 жыл бұрын
Glad you liked it m8! Have a great day and thank you so much for watching!
@oscarjesusresendiz100
@oscarjesusresendiz100 4 жыл бұрын
Awesome dude!
@saadabbasi2063
@saadabbasi2063 3 жыл бұрын
`docker-compose up -d` Here -d is not demon-ise but -detached Well, thank you so much for this great short series
@dejo095
@dejo095 5 жыл бұрын
Great stuff thanks
@chandrashekarbk007
@chandrashekarbk007 5 жыл бұрын
where can i find other two video links?
@merunasg
@merunasg 4 жыл бұрын
How did you do the blue arrow in your terminal? Thank you for the amazing tutorial.
@FredrikChristenson
@FredrikChristenson 4 жыл бұрын
ohmyz.sh/ Have a great day and thank you so much for watching!
@ibrahimalshekh831
@ibrahimalshekh831 3 жыл бұрын
That was great
@mikekennedy8644
@mikekennedy8644 6 жыл бұрын
very useful, thank you
@FredrikChristenson
@FredrikChristenson 6 жыл бұрын
Glad you like it m8!
@pjmclenon
@pjmclenon 4 жыл бұрын
hello and thank you for the vid series, and so what would you consider plz a large scale project?..like a social network or an online store or search tool?..okay thank you Lisa good day
@AhmedNasser-gx2cf
@AhmedNasser-gx2cf 3 жыл бұрын
A project with lots of people working on it.
@RahulThachilath
@RahulThachilath 5 жыл бұрын
Amazing summarization of node based microservices. Could you explain how would one implement authentication and authorization for the same?
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
That depends on the setup of the system and who is making the calls. I don't think I can cover all the cases and have it make sense to you in a comment but the basic case is that you provide the client with a token they include in the request to the system that acts as their authentication. When the clients makes a call you know if they are allowed in if they have this token. This topic is a lot bigger than this and I have a few videos planned where I will go more in depth in to how to do this, we will cover the basics and the more advanced cases in time. Have a great day and thank you so much for watching!
@BryanDike-vh2fj
@BryanDike-vh2fj 4 жыл бұрын
Please create a course on Udemy for this!!!!!! This was awesome.
@vie-on-whitte
@vie-on-whitte 6 жыл бұрын
Hi, I already saw the 3 videos, great job, I was looking for an explanation like this. I have 3 questions if you don't mind: 1. what course or book do you recommend to study this more in deep? 2. Could you make a tutorial on how it should be on larger projects or productions enviroments (maybe using RabbitMQ or some of the tools you just mencioned) 3. Which are those tools that actually can be used on production? (Kubernetes maybe (?), I don't know if k8 have a queue manager) Thanks :)
@FredrikChristenson
@FredrikChristenson 6 жыл бұрын
Hi Jorge! I am afraid that I don't know of any books of value that touch on Microservices more in depth, my experiences comes from articles and presentations with quite a bit of time working with them myself. I have a video planned for showing how to use RabbitMQ with Microservies in order to solve service discovery, this is just one of many possible architectures but it is the one I know to be the easiest to maintain although there is a series of other problems worth addressing which I will try to explain as well. Using Microservices in production is only efficient imo if you have something like Kubernetes to manage the infrastructure. In my experience there are a few things that are critical for Microservices or any distributed system of significant scale: 1. Kubernetes and Docker are almost a must if you don't have an entire team 2. Logging with service labels so you know which instance is doing what 3. Metrics are critical, you need to track each service and the response times 4. Terraform or a similar tool to store configurations so you can recreate your setup For logging needs you will be fine with most payed solutions but if you need to self host my personal favourite is: www.elastic.co/products/kibana For metrics I use: prometheus.io/ (storing metrics) grafana.com/ (creating dashboards to visualise data) I am working on a video where I will show you how to set this up and how I use it at work almost every day. Have a great day and thank you so much for watching!
@restuwahyusaputra7764
@restuwahyusaputra7764 3 жыл бұрын
Please next time, this tutorial include with kubernetes, because this tutorial very helpful for me.
@anagharao9948
@anagharao9948 Жыл бұрын
hi Fredrik.. without docker can i implement the concept of micro service? My understanding is 1) Each model in monolithic app will be project here .. now hw to run all without docker
@nikhilpatil8798
@nikhilpatil8798 4 жыл бұрын
Thanks Man
@ironpurush0978
@ironpurush0978 4 жыл бұрын
What's the name of this editor theme?
@danielkrajnik3817
@danielkrajnik3817 3 жыл бұрын
I smashed like button, now my screen is cracked
@jamesharden4553
@jamesharden4553 4 жыл бұрын
Hi Fred, which vs code theme are you using in this video?
@FredrikChristenson
@FredrikChristenson 4 жыл бұрын
Monokai dark iirc
@RahulPradipPatil
@RahulPradipPatil 6 жыл бұрын
Great 👍
@FredrikChristenson
@FredrikChristenson 6 жыл бұрын
+Rahul Patil glad you liked it!
@AdityaFingerstyle
@AdityaFingerstyle 5 жыл бұрын
Thank you for this tutorial. I think I get the concept of microservices but I just don't see the use of docker here. I mean couldn't all this be done with just as much ease without docker ? I have never used docker and maybe this video isn't exactly about docker. I hope to learn more about it in the later videos. :)
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
Hi m8! It is true that this basic example could be used without docker but once you need more instances of each give service things become a bit harder. Imagine if each of these services had 5 instances each or maybe 20 each? It is possible for you to make that work but it becomes a lot more work than if you use Docker or possibly Chef, Ansible, Salt or whichever DevOps tools you prefer. Manually setting up a service network is a lot of work if you don't use some form of automation for deploying and Docker is a very good choice for this sort of thing. Have a great day and thank you so much for watching!
@AdityaFingerstyle
@AdityaFingerstyle 5 жыл бұрын
Thank you for your response. I'm learning docker and I'm loving it !
@yevhenlogosha4891
@yevhenlogosha4891 6 жыл бұрын
Great! What are your dot files? thanks
@FredrikChristenson
@FredrikChristenson 6 жыл бұрын
You can find them here m8: github.com/fChristenson/fc-configs Have a great day and thank you so much for watching!
@yevhenlogosha4891
@yevhenlogosha4891 6 жыл бұрын
Fredrik Christenson thanks mate. Great tuts!
@rampandey191
@rampandey191 4 жыл бұрын
Hey I have a question if we have a container with the nodejs code should we use pm2 for performance or let it be?
@FredrikChristenson
@FredrikChristenson 4 жыл бұрын
I don't use pm2 inside of containers imo it is simpler to just use more containers if I am running on multiple cores. This may be what you are looking for if you want to: pm2.keymetrics.io/docs/usage/docker-pm2-nodejs/ There are some other issues to be aware of: stackoverflow.com/questions/51191378/what-is-the-point-of-using-pm2-and-docker-together I haven't benched which is faster tbh.
@rampandey191
@rampandey191 4 жыл бұрын
@@FredrikChristenson ok so for adding multiple containers I will have to add a load balancer in front of the containers right?
@FredrikChristenson
@FredrikChristenson 4 жыл бұрын
Yes, either you run your own inside of another container or use a provided one.
@rampandey191
@rampandey191 4 жыл бұрын
@@FredrikChristenson ok thanks!
@ahmedmusawir
@ahmedmusawir 5 жыл бұрын
This is really awesome! Can you plz share the code for this project? A GitHub link may be?
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
Glad you enjoyed it m8 and here is the code: github.com/fChristenson/microservices-example Have a great day and thank you so much for watching!
@ahmedmusawir
@ahmedmusawir 5 жыл бұрын
Thank you very much! What I love about your approach is the simplicity ... total focus on the concepts rather than the code itself. If I know my abc-s eventually I might be able to write a novel ... that's what you've given us here. Trust me I was about to give up on this cuz the stuff I had was too complex ... thank you very much and hopefully you'll not stop here and give us some more awesomeness ... may be along the lines of Kubernetes base deoplyment of Microservices based projects etc. ... thanx in advance.
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
No worries Ahmed, I will put this suggestion on my list. I have also prepped a video where I will show you how to build a more scalable version where we use something like RabbitMQ to act as a message broker, it is imo a nice way to manage service discovery. Have a great day and thank you so much for watching!
@noor777300
@noor777300 4 жыл бұрын
How can I pass jwt auth token between microservice?
@FredrikChristenson
@FredrikChristenson 4 жыл бұрын
Usually the calling service gets a token and uses it in each request to the services but it sounds like you want to share it between the services and that is easiest done either by storing all created tokens in a shared database. Have a great day and thank you so much for watching!
@sumeetwajpe
@sumeetwajpe 5 жыл бұрын
HI.. Great Videos.. I am getting the same error that you got while running at port 3000 and my app does not run on port 8080? I watched each steps very closely but i still get that error ! Can you please help me with this ? Also do we need to locally run the app at port 8080 if we have images up in docker? Here is the attached snapshot of error ! github.com/SumeetWajpe/NodeMSError/blob/master/Error.png
@TheDesvendador
@TheDesvendador 4 жыл бұрын
so basicaly microservices are like SOLID principles? Single Responsability Principle?
@FredrikChristenson
@FredrikChristenson 4 жыл бұрын
Not necessarily, this is just how they can be structured but nothing stops you from combining multiple entities in one service or split it even further and have multiple services that take care of the same entity, this is just a very clean split. Have a great day and thank you so much for watching!
@TheDesvendador
@TheDesvendador 4 жыл бұрын
@@FredrikChristenson got it, but in that case, what makes it a microservice and not a "macroservice" or a monolit? since it can have multiple services as you said
@FredrikChristenson
@FredrikChristenson 4 жыл бұрын
That is the argument the people who claim that MicroServices are just SOA remade make. It is not a monolith as we have multiple services therefore it can not be a monolith since this is a single application containing all our logic. Some claim a MicroService can be a single function and some split it differently, what I show you is just what I have found to be the most common split, I leave it to others to argue about what to call services you split differently. At the end of the day it matters very little what you call it, what matters is that it works well for your use case, you can still call it MicroServices, everyone does regardless of if it is semantically correct or not. The same thing is true for REST, API or that html is "code". Have a great day and thank you so much for watching!
@TheDesvendador
@TheDesvendador 4 жыл бұрын
​@@FredrikChristenson i see, i'll have to read more about SOA lol, really appreciate the reply!! please do more videos like this, talking about architecture, complex "things"
@memoriasIT
@memoriasIT 5 жыл бұрын
0 dislikes say a lot of you
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
Well thank you, I am a bit surprised myself but very happy to see that the video is useful to people! Have a great day and thank you so much for watching!
Microservices Explained in 5 Minutes
5:17
5 Minutes or Less
Рет қаралды 714 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 75 МЛН
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 32 МЛН
This is not my neighbor  Terrible neighbor! #funny #zoonomaly #memes
00:26
Little girl's dream of a giant teddy bear is about to come true #shorts
00:32
Design Microservice Architectures the Right Way
48:30
InfoQ
Рет қаралды 709 М.
Authentication as a Microservice
50:26
Oracle Developers
Рет қаралды 215 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 556 М.
Programming Is NOT Enough | Add these 7 skills…
13:19
Travis Media
Рет қаралды 415 М.
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Software Developer Diaries
Рет қаралды 74 М.
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 253 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 75 МЛН