2024年3月1週目振り返り

今週やったこと

ドキュメント作成

自分が実装したバッチ処理のフローをドキュメントにまとめつつ、draw.ioで図を描きました。

テキストで書いた方が良い情報と図の方が良い情報があると思うので、読み手に負荷をかけないようにしつつ必要な情報をドキュメントに含められるようにいろいろ試していきたいと思います。

draw.ioで図を書く方法がかなり慣れてきたので今後は人に見せるものではなくても、自分が取り組んでいるタスクがある程度複雑な時な図に落とし込んで整理することもしたいと考えてます。

GitHub Copilotの使い方を勉強

www.youtube.com

こちらの動画を見ながら同じように手を動かしてGitHub Copilotの使い方を真似してみました。

業務でCopilotを使ってはいるものの、まだ使いこなせてはいないと感じるので時々VSCodeYouTubeチャンネルを見て自分のCopilotの使い方をアップデートしてます。

今週学んだこと

ELBとRoute 53でのURLルーティングの使い分け

ELBとRoute 53どちらもURLでルーティングを切り替えることができる気がして、どういう使い分け方になるか自分の中で言語化できなかったのでChatGPTに質問しました。

簡単にまとめるとルーティングのレイヤーが違うということで、Route 53は通信が成立する前のDNSレベルで処理し、ELBは通信が成立した後のレイヤー4かレイヤー7で処理が行われるとのことでした。

ネットワークのレイヤーについてはしばらく勉強してないと忘れそうになるので時々調べ物をして思い出したいと思います。

質問

I'm wondering that Route 53 and Elastic Load Balancer both have routeing functionality. What's the diference between them

回答

Amazon Route 53 and Elastic Load Balancer (ELB) both offer routing functionality within AWS, but they serve different purposes and operate at different levels of the networking stack. Here's a breakdown of their key differences:

Amazon Route 53

  • DNS Service: Route 53 is a highly available and scalable Domain Name System (DNS) web service. It is primarily used for domain registration, DNS routing, and health checking of resources.
  • Global Traffic Routing: Route 53 operates at the DNS level to route end-user requests to the best available endpoint based on various routing policies such as latency, geography, health status, and more. It can direct traffic to multiple types of resources outside and inside AWS, like EC2 instances, S3 buckets, or other DNS names.
  • Health Checks and Monitoring: It can monitor the health of your resources and route traffic away from unhealthy ones to ensure high availability.
  • DNS Level Decision Making: The routing decisions are made at the DNS level, which means it's effective for directing traffic at a global scale, before the connection to the actual service is made.

Elastic Load Balancer (ELB)

  • Load Balancing Service: ELB automatically distributes incoming application or network traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones.
  • Types of Load Balancers: AWS offers three types of load balancers that operate at different layers of the OSI model: Application Load Balancer (ALB) operates at the request level (Layer 7), Network Load Balancer (NLB) operates at the connection level (Layer 4), and Classic Load Balancer (CLB) provides basic load balancing across multiple EC2 instances.
  • High Availability and Fault Tolerance: ELB is designed to handle traffic within AWS, ensuring that the workload is distributed to keep applications highly available and fault-tolerant.
  • Advanced Routing Features (ALB): ALB, for example, supports advanced routing features such as host-based and path-based routing, allowing decisions to be made based on the content of the request.

Key Differences

  • Scope of Operation: Route 53 operates globally, making it suitable for directing traffic to the most appropriate endpoint across the globe. ELB operates within a specific AWS region, distributing traffic across targets within that region.
  • Layer of Operation: Route 53 operates at the DNS level, making routing decisions before the client establishes a connection to the target. ELB operates at the connection (Layer 4) or request (Layer 7) level, distributing traffic after the connection has been established.
  • Use Cases: While both can be used together for a robust solution, Route 53 is ideal for global traffic routing and DNS management, whereas ELB is suited for balancing load between instances within AWS to optimize resource use and application performance.

In many architectures, Route 53 and ELB are used together to achieve both global traffic distribution and efficient load balancing at the regional level. Route 53 can direct traffic to the most appropriate regional endpoint, which in turn is balanced across available resources by ELB.

勉強になった記事など

www.youtube.com

GitHub Copilotを使う際に、こういう使い方はしないでという観点から話している動画です。かなりわかりやすかったです。