1 00:00:00,610 --> 00:00:02,700 ‫Now, let's talk about another service 2 00:00:02,700 --> 00:00:04,570 ‫that's called AWS X-Ray. 3 00:00:04,570 --> 00:00:08,090 ‫So, when by default some people do debugging in productions, 4 00:00:08,090 --> 00:00:10,420 ‫so, when your application is actually deployed, 5 00:00:10,420 --> 00:00:12,530 ‫the good old way, you would test locally, 6 00:00:12,530 --> 00:00:14,210 ‫then you would add log statements anywhere. 7 00:00:14,210 --> 00:00:15,940 ‫Maybe look into how it logs, 8 00:00:15,940 --> 00:00:17,720 ‫then you would re-deploy in production, 9 00:00:17,720 --> 00:00:20,370 ‫and the see if you can find the problem this way. 10 00:00:20,370 --> 00:00:22,550 ‫And the problem is that we have logs 11 00:00:22,550 --> 00:00:24,960 ‫from different services and different applications. 12 00:00:24,960 --> 00:00:26,500 ‫Doing log analysis it is very hard 13 00:00:26,500 --> 00:00:28,530 ‫because we have to combine everything. 14 00:00:28,530 --> 00:00:30,040 ‫So, if you have one application 15 00:00:30,040 --> 00:00:33,560 ‫that's called a big monolith, so, one giant application, 16 00:00:33,560 --> 00:00:35,800 ‫it's sort of easy to do debugging. 17 00:00:35,800 --> 00:00:37,600 ‫But if you have distributed services 18 00:00:37,600 --> 00:00:39,760 ‫they're connected through SQS queues, 19 00:00:39,760 --> 00:00:42,390 ‫SNS topics, they're decoupled and so on, 20 00:00:42,390 --> 00:00:44,620 ‫it becomes really, really hard to trace 21 00:00:44,620 --> 00:00:46,840 ‫and see what is happening within your system. 22 00:00:46,840 --> 00:00:49,450 ‫So, you have no common view of your entire architecture. 23 00:00:49,450 --> 00:00:50,900 ‫But to solve that problem, 24 00:00:50,900 --> 00:00:53,250 ‫you can use AWS X-Ray. 25 00:00:53,250 --> 00:00:55,140 ‫So, with X-Ray, you're going to be able 26 00:00:55,140 --> 00:00:59,510 ‫to do a tracing and get visual analysis of your application. 27 00:00:59,510 --> 00:01:02,670 ‫So, X-Ray, once you enable it on your services, 28 00:01:02,670 --> 00:01:04,720 ‫then you'll get a full picture 29 00:01:04,720 --> 00:01:07,310 ‫of what is happening for each service. 30 00:01:07,310 --> 00:01:10,190 ‫And see where they're failing, their performance, 31 00:01:10,190 --> 00:01:12,100 ‫and in case one request goes wrong, 32 00:01:12,100 --> 00:01:13,550 ‫you will be able to visualize it 33 00:01:13,550 --> 00:01:16,480 ‫directly into the X-Ray console. 34 00:01:16,480 --> 00:01:18,400 ‫So, the X-Ray advantages, 35 00:01:18,400 --> 00:01:20,790 ‫is to do troubleshooting of the performance 36 00:01:20,790 --> 00:01:22,070 ‫through the bottlenecks, 37 00:01:22,070 --> 00:01:23,590 ‫or to understand the dependencies 38 00:01:23,590 --> 00:01:24,920 ‫in a microservice architecture, 39 00:01:24,920 --> 00:01:26,400 ‫because they're all connected 40 00:01:26,400 --> 00:01:28,240 ‫as you saw in the previous graph. 41 00:01:28,240 --> 00:01:30,980 ‫We can pinpoint a service issue with tracing. 42 00:01:30,980 --> 00:01:33,290 ‫We can review a specific request behavior, 43 00:01:33,290 --> 00:01:35,910 ‫and find the errors and exceptions for that request. 44 00:01:35,910 --> 00:01:37,820 ‫We can know if we're meeting or not 45 00:01:37,820 --> 00:01:40,120 ‫our service-level agreement, or SLA, 46 00:01:40,120 --> 00:01:43,620 ‫meaning are we replying on time for all the requests. 47 00:01:43,620 --> 00:01:45,050 ‫And if we're being throttled, 48 00:01:45,050 --> 00:01:46,220 ‫if we're being slowed down, 49 00:01:46,220 --> 00:01:48,530 ‫where is it happening, in which service? 50 00:01:48,530 --> 00:01:50,870 ‫And finally, what or which users 51 00:01:50,870 --> 00:01:54,000 ‫are going to be impacted by these outages. 52 00:01:54,000 --> 00:01:56,440 ‫So, X-Ray really is great when you see, 53 00:01:56,440 --> 00:01:58,860 ‫distributed tracing, troubleshooting, 54 00:01:58,860 --> 00:02:00,810 ‫and you want to have a service graph. 55 00:02:00,810 --> 00:02:02,890 ‫That's it, it's a more complicated service to use, 56 00:02:02,890 --> 00:02:04,260 ‫so, I will not do any hands-on. 57 00:02:04,260 --> 00:02:05,600 ‫But you get a high level of review 58 00:02:05,600 --> 00:02:08,030 ‫that will be enough for the exam. 59 00:02:08,030 --> 00:02:09,060 ‫So, hope you liked this lecture, 60 00:02:09,060 --> 00:02:11,010 ‫and I will see you in the next lecture.