How to understand a complex system - Dylan Beattie - https://www.youtube.com/watch?v=tl9YPdk-PB0 Someone comes to you as the architect and says, we want to build a system that does this. We want to decouple like a login system so we can build different microservices that use common authentication. How can we do that? And your job is to come up with a way of doing it. First of all, what have you got now? A lot of time in organizations and software teams, there will be two versions of the truth. There will be what people think they have because they paid someone a lot of money for a high performance transaction processing system. And there will be what they actually have, which is 100,000 lines of ruby that doesn't work properly, you know, and you need to understand these disparities. Now, the best way I've found of doing this is to look at the borders, the boundaries between the different systems. You want to understand the traffic that is flowing between the components of these systems. Don't worry too much about the code, don't worry about the spec. And, you know, when people tell you what something does, take it with a pinch of salt. It's useful, but it might not be 100% accurate. Here is the simplest possible systems diagram I can think of. Now, as an architect, you don't care whether that website is php or.net or Pearl or Ruby or whatever, and the Internet, that's someone else's problem. But this thing in the middle, HTTP, how many questions can you ask about that? How many transactions does it cope with? Is there HTTPs on it? When does the certificate expire? Does it cope with get put post? What if I put a proxy in there? How much of this stuff can we cache? Are we using etags on the traffic that flows across it? Just by putting a network trace on on that HTTP and watching it for half an hour will tell you more about how this website actually works than any number of hours spent reading the code and going, oh, this module looks interesting. Oh, it's never been run. We don't know why it's here. Traffic is real. Traffic is the lifeblood of living systems. You don't care what anything was designed to do. Your Gene Krantz in Apollo 13, you care what it can do. You need to understand the actual capabilities of the systems, not what was in the spec. And sometimes this will be disappointing, like our high performance authentication system can only cope with six users a minute. Sometimes it'll be pleasantly surprising. You'll dig into AWS and be like, there's a whole redis cluster in here that I didn't know we had. This is brilliant. We can start using this to speed up all kinds of things. We can put varnish in front of our web server and boom. Instant acceleration. And we can start rewriting stuff. You know, there will be pleasant surprises as well as disappointments. It's well worth taking the time to do this.
복잡한 시스템을 이해하는 방법 - Dylan Beattie - https://www.youtube.com/watch?v=tl9YPdk-PB0 누군가가 아키텍트로 와서 이렇게 말합니다. 우리는 이런 일을 하는 시스템을 만들고 싶습니다. 우리는 로그인 시스템처럼 분리해서 공통 인증을 사용하는 다양한 마이크로서비스를 만들고 싶습니다. 어떻게 할 수 있을까요? 그리고 여러분의 일은 이를 수행할 방법을 생각해내는 것입니다. 우선, 지금 무엇을 가지고 있습니까? 조직과 소프트웨어 팀에서 많은 시간을 보내다 보면 진실에는 두 가지 버전이 있습니다. 사람들이 고성능 트랜잭션 처리 시스템에 많은 돈을 지불했기 때문에 가지고 있다고 생각하는 것이 있습니다. 그리고 실제로 가지고 있는 것은 제대로 작동하지 않는 100,000줄의 루비입니다. 이러한 차이점을 이해해야 합니다. 제가 발견한 가장 좋은 방법은 경계, 즉 서로 다른 시스템 간의 경계를 살펴보는 것입니다. 이러한 시스템의 구성 요소 간에 흐르는 트래픽을 이해해야 합니다. 코드나 사양에 대해 너무 걱정하지 마세요. 그리고 아시다시피, 사람들이 무언가의 기능을 말할 때, 그것을 가볍게 여기세요. 유용하지만 100% 정확하지는 않을 수도 있습니다. 제가 생각할 수 있는 가장 간단한 시스템 다이어그램이 있습니다. 이제 아키텍트로서, 그 웹사이트가 php인지, .net인지, Pearl인지, Ruby인지는 중요하지 않습니다. 그리고 인터넷은 다른 사람의 문제입니다. 하지만 중간에 있는 이 HTTP에 대해 얼마나 많은 질문을 할 수 있을까요? 얼마나 많은 트랜잭션을 처리할 수 있을까요? HTTP가 있나요? 인증서는 언제 만료되나요? get put post를 처리할 수 있을까요? 프록시를 넣으면 어떨까요? 이 중 얼마나 많은 것을 캐시할 수 있을까요? 이를 통과하는 트래픽에 etag를 사용하고 있을까요? 그 HTTP에 네트워크 추적을 넣고 30분 동안 지켜보는 것만으로도 코드를 읽고, 오, 이 모듈이 흥미로워 보이네. 오, 실행한 적이 없네라고 말하는 데 시간을 보내는 것보다 이 웹사이트가 실제로 어떻게 작동하는지 더 잘 알 수 있습니다. 왜 여기 있는지는 모릅니다. 트래픽은 실제입니다. 트래픽은 살아있는 시스템의 생명선입니다. 어떤 것이 무엇을 하도록 설계되었는지는 중요하지 않습니다. Apollo 13의 Gene Krantz라면 무엇을 할 수 있는지가 중요합니다. 사양에 있는 것이 아니라 시스템의 실제 기능을 이해해야 합니다. 때로는 우리의 고성능 인증 시스템이 분당 6명의 사용자만 처리할 수 있는 것처럼 실망스러울 수 있습니다. 때로는 기분 좋게 놀랄 수 있습니다. AWS를 파헤쳐 보면, 우리가 몰랐던 Redis 클러스터가 여기에 있다고 생각할 것입니다. 대단합니다. 이것을 사용하여 모든 종류의 것을 가속화할 수 있습니다. 웹 서버 앞에 바니시를 바르면 붐. 즉각적인 가속. 그리고 다시 쓰기 시작할 수 있습니다. 알다시피, 기분 좋은 놀라움과 실망이 있을 것입니다. 시간을 내어 이 작업을 수행하는 것은 가치가 있습니다.