Skip to contentমূল লেখায় যান

Topic 43 · Courseটপিক 43 · Course

Service Discovery

You call the payment service from the order service. Yesterday it ran on one address. Today a new copy started, an old copy stopped, and the address list is different. How does the order service know where to send the request?

7 min read7 মিনিটে পড়া যায় · 8 sections8টি সেকশন · 5 sources5টি সোর্স · updated Nov 2026আপডেট: Nov 2026

Service discovery: finding a live instanceসার্ভিস ডিসকভারি: চালু ইনস্ট্যান্স খুঁজে পাওয়া

Instances register, pass health checks and drop out. Slow the check and see more calls hit a dead instance.ইনস্ট্যান্স রেজিস্টার করে, হেলথ চেকে পাস করে ও বাদ পড়ে। চেক ধীর করুন আর দেখুন মৃত ইনস্ট্যান্সে বেশি কল যায়।

3 min3 মিনিট8 steps8টি ধাপ
  • In the poolপুলে আছে0 / 3
  • Really aliveসত্যিই চালু3 / 3
  • Check everyচেক প্রতি10 s
registerরেজিস্টারregisterরেজিস্টারregisterরেজিস্টারCI jobCI জবRegistryরেজিস্ট্রি3 listed3টি তালিকায়new check: criticalনতুন চেক: ক্রিটিক্যালapi 1এপিআই 110.0.0.1110.0.0.11criticalক্রিটিক্যালapi 2এপিআই 210.0.0.1210.0.0.12criticalক্রিটিক্যালapi 3এপিআই 310.0.0.1310.0.0.13criticalক্রিটিক্যাল

You’ll learnআপনি শিখবেন

  • Why a new check starts criticalনতুন চেক কেন critical-এ শুরু হয়✓
  • How a caller finds an instance by nameকলার নাম ধরে ইনস্ট্যান্স কীভাবে খোঁজে
  • How a dead instance leaves the poolমৃত ইনস্ট্যান্স কীভাবে পুল ছাড়ে
  • Why a slow check means more wrong callsধীর চেকে কেন ভুল কল বাড়ে

In plain words

Service discovery is the way a service finds the network address of another service. Consul, a tool from HashiCorp, says it helps you find services, follow them, and watch their health inside a network Source 3সোর্স 3. It keeps a record of the services in a service catalog, which is one source of truth that services can query Source 3সোর্স 3.

The examples are Kubernetes and Consul. Each behavior below belongs to that product, not to every system.

সহজ English

Service discovery is the way a service finds the network address of another service. Consul is a tool from HashiCorp. Consul says service discovery helps you find services, follow them, and watch their health inside a network. Source 3সোর্স 3 Consul keeps a record of the services in a service catalog. The catalog is one source of truth that services can query. Source 3সোর্স 3

The examples are Kubernetes and Consul. Each behavior below belongs to that product. It does not belong to every system.

বাংলা ব্যাখ্যা

সার্ভিস ডিসকভারি (service discovery) হলো একটি সার্ভিসের অন্য একটি সার্ভিসের নেটওয়ার্ক অ্যাড্রেস খুঁজে পাওয়ার উপায়। Consul হলো HashiCorp-এর একটি টুল। Consul বলে, সার্ভিস ডিসকভারি একটি নেটওয়ার্কের ভেতরে সার্ভিস খুঁজতে, তাদের অনুসরণ করতে এবং তাদের স্বাস্থ্য (health) দেখতে সাহায্য করে। Source 3সোর্স 3 Consul সার্ভিসগুলোর একটি রেকর্ড একটি সার্ভিস ক্যাটালগে (service catalog) রাখে। ক্যাটালগ হলো একটি একক সত্যের উৎস (source of truth), যেখানে সার্ভিসরা কোয়েরি করতে পারে। Source 3সোর্স 3

উদাহরণ হলো Kubernetes ও Consul। নিচের প্রতিটি আচরণ ওই প্রোডাক্টের। এটি সব সিস্টেমের নয়।

When you need it

Addresses change because the set of running copies (instances) changes. Kubernetes says a Deployment can create and destroy Pods dynamically, so the Pods that run now may differ from the Pods that run a moment later Source 1সোর্স 1. Pods are short-lived, and each Pod gets its own IP address Source 1সোর্স 1. This leads to a question that the Kubernetes docs ask: how does a frontend find and track the address of a backend Source 1সোর্স 1?

Consul says the same about microservices: the set of active instances changes often, so instances rely on a catalog to get current access information Source 3সোর্স 3.

সহজ English

Addresses change because the set of running copies (instances) changes. Kubernetes says a Deployment can create and destroy Pods dynamically. So the Pods that run now may differ from the Pods that run a moment later. Source 1সোর্স 1 Pods are short-lived. Each Pod gets its own IP address. Source 1সোর্স 1 This leads to a question that the Kubernetes docs ask: how does a frontend find and track the address of a backend? Source 1সোর্স 1

Consul says the same about microservices. The set of active instances changes often. So instances rely on a catalog to get current access information. Source 3সোর্স 3

বাংলা ব্যাখ্যা

অ্যাড্রেস বদলায়, কারণ চলমান কপির (ইনস্ট্যান্সের, instance) সেট বদলায়। Kubernetes বলে, একটি Deployment গতিশীলভাবে (dynamically) Pod তৈরি ও ধ্বংস করতে পারে। তাই এখন যে Pod চলছে, একটু পরে চলা Pod তার থেকে আলাদা হতে পারে। Source 1সোর্স 1 Pod স্বল্পস্থায়ী। প্রতিটি Pod নিজস্ব IP অ্যাড্রেস পায়। Source 1সোর্স 1 এ থেকে একটি প্রশ্ন আসে, যা Kubernetes-এর ডকুমেন্টেশন তোলে: একটি ফ্রন্টএন্ড কীভাবে একটি ব্যাকএন্ডের অ্যাড্রেস খুঁজে পায় ও তা ট্র্যাক করে? Source 1সোর্স 1

Consul মাইক্রোসার্ভিস নিয়ে একই কথা বলে। সক্রিয় ইনস্ট্যান্সের সেট প্রায়ই বদলায়। তাই ইনস্ট্যান্সরা বর্তমান অ্যাক্সেস তথ্য পেতে একটি ক্যাটালগের ওপর নির্ভর করে। Source 3সোর্স 3

How it works

A registry. A new instance registers itself in the catalog with its IP address and port Source 3সোর্স 3. Consul says the catalog changes as instances are added, and as old or unhealthy instances are removed. A removed instance no longer receives requests Source 3সোর্স 3. Consumers then ask for a service by its identity, and not by an address Source 3সোর্স 3.

Health checks. A registry is only useful if it does not list dead instances. In Consul, a health check tests whether a service or a node is healthy, and you write it inside the service definition Source 4সোর্স 4. Consul offers several kinds of check, for example script, HTTP, TCP, gRPC, and TTL checks Source 4সোর্স 4. Some examples of Consul behavior:

CheckWhat Consul does
HTTPA response code from 200 to 299 is healthy, 429 is a warning, and any other code is a failure Source 4সোর্স 4.
TCPA connection that opens is a success. A host that refuses the connection is critical Source 4সোর্স 4.
ScriptExit code 0 is passing, 1 is a warning, and any other code is a failure Source 4সোর্স 4.
TTLThe service must send updates. If none comes in time, the check becomes critical Source 4সোর্স 4.

A new Consul check starts as critical by default. This keeps a service out of the pool until its health is verified Source 4সোর্স 4. Kubernetes has its own idea of "ready". Its docs say that traffic can go to healthy ("ready") backends Source 1সোর্স 1. They also say that the DNS system creates A and AAAA records for the IP addresses of a Service's ready endpoints, for all Service types except ExternalName Source 1সোর্স 1.

DNS in Kubernetes. A cluster DNS add-on, for example CoreDNS, follows new Services in the Kubernetes API and makes DNS records for each Source 1সোর্স 1. Pods can then use a name and not an IP address Source 2সোর্স 2. A normal Service gets a name of the form my-svc.my-namespace.svc.cluster-domain.example Source 2সোর্স 2. The name points to the cluster IP of that Service Source 2সোর্স 2. Kubernetes reserves that IP from a pool set aside for this Source 1সোর্স 1.

Namespaces. A name without a namespace stays inside the namespace of the asking Pod. A Pod in test that asks for data gets no answer if the Service lives in prod, but data.prod works Source 2সোর্স 2. The kubelet writes a search list into each Pod's /etc/resolv.conf, which expands short names Source 2সোর্স 2. Kubernetes supports only the documented name layout. Other names that happen to work may change without warning Source 2সোর্স 2.

SRV records. A named port also gets an SRV record, so a client can ask for the port number as well as the address Source 1সোর্স 1 Source 2সোর্স 2.

Headless Services. A headless Service has no cluster IP. Its name resolves to the IPs of all the selected Pods Source 2সোর্স 2. The client uses the set or picks one by round-robin Source 2সোর্স 2. For a headless Service, the platform does no load balancing or proxying Source 1সোর্স 1.

Environment variables. Kubernetes has a second way too: the kubelet adds environment variables for each active Service. The Service must exist before the client Pod starts, or the Pod does not get them. DNS has no such order rule Source 1সোর্স 1.

DNS in Consul. Consul DNS lets a client look up services without HTTP API calls. Consul recommends it for virtual machines, because the application does not need to change Source 5সোর্স 5. Lookups are case-sensitive Source 5সোর্স 5. Prepared queries can filter by several tags Source 5সোর্স 5. They can also ask a remote datacenter when the local one has no healthy node Source 5সোর্স 5.

সহজ English

A registry. A new instance registers itself in the catalog. It gives its IP address and port. Source 3সোর্স 3 Consul says the catalog changes as instances are added. It also changes as old or unhealthy instances are removed. A removed instance no longer gets requests. Source 3সোর্স 3 Consumers then ask for a service by its identity. They do not ask by an address. Source 3সোর্স 3

Health checks. A registry is only useful if it does not list dead instances. In Consul, a health check tests whether a service or a node is healthy. You write it inside the service definition. Source 4সোর্স 4 Consul offers several kinds of check, for example script, HTTP, TCP, gRPC, and TTL checks. Source 4সোর্স 4 Some examples of Consul behavior:

A new Consul check starts as critical by default. This keeps a service out of the pool until its health is verified. Source 4সোর্স 4 Kubernetes has its own idea of "ready". Its docs say that traffic can go to healthy ("ready") backends. Source 1সোর্স 1 They also say that the DNS system creates A and AAAA records for the IP addresses of a Service's ready endpoints, for all Service types except ExternalName. Source 1সোর্স 1

DNS in Kubernetes. A cluster DNS add-on, for example CoreDNS, follows new Services in the Kubernetes API. It makes DNS records for each one. Source 1সোর্স 1 Pods can then use a name and not an IP address. Source 2সোর্স 2 A normal Service gets a name of the form my-svc.my-namespace.svc.cluster-domain.example. The name points to the cluster IP of that Service. Source 2সোর্স 2 Kubernetes reserves that IP from a pool set aside for this. Source 1সোর্স 1

A name without a namespace stays inside the namespace of the Pod that asks. A Pod in test that asks for data gets no answer if the Service lives in prod. But data.prod works. Source 2সোর্স 2 The kubelet writes a search list into the /etc/resolv.conf of each Pod. The list expands short names. Source 2সোর্স 2 Kubernetes supports only the documented name layout. Other names that happen to work may change without warning. Source 2সোর্স 2

A named port also gets an SRV record. So a client can ask for the port number as well as the address. Source 1সোর্স 1 Source 2সোর্স 2

A headless Service has no cluster IP. Its name resolves to the IPs of all the selected Pods. The client uses the set, or picks one by round-robin. Source 2সোর্স 2 For a headless Service, the platform does no load balancing or proxying. Source 1সোর্স 1

Kubernetes has a second way too. The kubelet adds environment variables for each active Service. The Service must exist before the client Pod starts. If not, the Pod does not get them. DNS has no such order rule. Source 1সোর্স 1

DNS in Consul. Consul DNS lets a client look up services without HTTP API calls. Consul recommends it for virtual machines, because the application does not need to change. Source 5সোর্স 5 Lookups are case-sensitive. Source 5সোর্স 5 Prepared queries can filter by several tags. They can also ask a remote datacenter when the local one has no healthy node. Source 5সোর্স 5

বাংলা ব্যাখ্যা

একটি রেজিস্ট্রি (registry)। একটি নতুন ইনস্ট্যান্স নিজেকে ক্যাটালগে রেজিস্টার করে। সে তার IP অ্যাড্রেস ও পোর্ট দেয়। Source 3সোর্স 3 Consul বলে, ইনস্ট্যান্স যোগ হলে ক্যাটালগ বদলায়। পুরনো বা আনহেলদি ইনস্ট্যান্স সরানো হলেও ক্যাটালগ বদলায়। সরানো ইনস্ট্যান্স আর রিকুয়েস্ট পায় না। Source 3সোর্স 3 তখন কনজিউমাররা একটি সার্ভিস চায় তার আইডেন্টিটি দিয়ে। অ্যাড্রেস দিয়ে চায় না। Source 3সোর্স 3

হেলথ চেক (health check)। রেজিস্ট্রি তখনই কাজের, যখন তা মৃত ইনস্ট্যান্সকে তালিকায় রাখে না। Consul-এ একটি হেলথ চেক পরীক্ষা করে একটি সার্ভিস বা নোড হেলদি কি না। আপনি এটি সার্ভিস ডেফিনিশনের ভেতরে লেখেন। Source 4সোর্স 4 Consul কয়েক ধরনের চেক দেয়, যেমন স্ক্রিপ্ট, HTTP, TCP, gRPC ও TTL চেক। Source 4সোর্স 4 Consul-এর আচরণের কিছু উদাহরণ:

  • HTTP: 200 থেকে 299 পর্যন্ত রেসপন্স কোড হেলদি। 429 একটি ওয়ার্নিং। অন্য যেকোনো কোড একটি ফেইলিউর। Source 4সোর্স 4
  • TCP: যে কানেকশন খোলে, তা সফল। যে হোস্ট কানেকশন প্রত্যাখ্যান করে, তা ক্রিটিক্যাল। Source 4সোর্স 4
  • স্ক্রিপ্ট: এক্সিট কোড 0 হলো পাসিং। 1 একটি ওয়ার্নিং। অন্য যেকোনো কোড একটি ফেইলিউর। Source 4সোর্স 4
  • TTL: সার্ভিসকে আপডেট পাঠাতে হয়। সময়মতো কোনোটি না এলে চেক ক্রিটিক্যাল হয়ে যায়। Source 4সোর্স 4

একটি নতুন Consul চেক ডিফল্টভাবে ক্রিটিক্যাল হিসেবে শুরু হয়। হেলথ যাচাই না হওয়া পর্যন্ত এটি সার্ভিসকে পুলের বাইরে রাখে। Source 4সোর্স 4 Kubernetes-এর নিজস্ব "ready" ধারণা আছে। এর ডকুমেন্টেশন বলে, ট্রাফিক হেলদি ("ready") ব্যাকএন্ডে যেতে পারে। Source 1সোর্স 1 তারা আরও বলে, ExternalName ছাড়া সব Service টাইপের জন্য DNS সিস্টেম Service-এর রেডি এন্ডপয়েন্টগুলোর IP অ্যাড্রেসের জন্য A ও AAAA রেকর্ড তৈরি করে। Source 1সোর্স 1

Kubernetes-এ DNS। একটি ক্লাস্টার DNS অ্যাড-অন, যেমন CoreDNS, Kubernetes API-তে নতুন Service অনুসরণ করে। এটি প্রতিটির জন্য DNS রেকর্ড তৈরি করে। Source 1সোর্স 1 তখন Pod IP অ্যাড্রেস নয়, একটি নাম ব্যবহার করতে পারে। Source 2সোর্স 2 একটি সাধারণ Service my-svc.my-namespace.svc.cluster-domain.example ধরনের একটি নাম পায়। নামটি ওই Service-এর ক্লাস্টার IP-র দিকে নির্দেশ করে। Source 2সোর্স 2 Kubernetes এই কাজের জন্য আলাদা রাখা একটি পুল থেকে ওই IP সংরক্ষণ করে। Source 1সোর্স 1

namespace ছাড়া একটি নাম যে Pod চাইছে, তার namespace-এর ভেতরেই থাকে। test-এ থাকা একটি Pod data চাইলে এবং Service prod-এ থাকলে সে উত্তর পায় না। কিন্তু data.prod কাজ করে। Source 2সোর্স 2 kubelet প্রতিটি Pod-এর /etc/resolv.conf-এ একটি সার্চ লিস্ট (search list) লেখে। তালিকাটি ছোট নাম বড় করে। Source 2সোর্স 2 Kubernetes শুধু নথিভুক্ত নামের কাঠামো সমর্থন করে। কাকতালীয়ভাবে কাজ করা অন্য নাম বিনা নোটিশে বদলে যেতে পারে। Source 2সোর্স 2

একটি নামযুক্ত পোর্ট (named port) একটি SRV রেকর্ডও পায়। তাই একটি ক্লায়েন্ট অ্যাড্রেসের পাশাপাশি পোর্ট নম্বরও চাইতে পারে। Source 1সোর্স 1 Source 2সোর্স 2

একটি হেডলেস Service-এর কোনো ক্লাস্টার IP নেই। এর নাম সব বাছাই করা Pod-এর IP-তে রিজলভ হয়। ক্লায়েন্ট পুরো সেটটি ব্যবহার করে, অথবা রাউন্ড-রবিন (round-robin) দিয়ে একটি বেছে নেয়। Source 2সোর্স 2 হেডলেস Service-এর জন্য প্ল্যাটফর্ম কোনো লোড ব্যালেন্সিং বা প্রক্সিং করে না। Source 1সোর্স 1

Kubernetes-এর দ্বিতীয় একটি উপায়ও আছে। kubelet প্রতিটি সক্রিয় Service-এর জন্য এনভায়রনমেন্ট ভেরিয়েবল যোগ করে। ক্লায়েন্ট Pod শুরু হওয়ার আগে Service-টি থাকতে হয়। না থাকলে Pod সেগুলো পায় না। DNS-এ এমন ক্রমের নিয়ম নেই। Source 1সোর্স 1

Consul-এ DNS। Consul DNS একটি ক্লায়েন্টকে HTTP API কল ছাড়াই সার্ভিস খুঁজতে দেয়। Consul এটি ভার্চুয়াল মেশিনের জন্য সুপারিশ করে, কারণ অ্যাপ্লিকেশন বদলাতে হয় না। Source 5সোর্স 5 লুকআপ কেস-সেনসিটিভ। Source 5সোর্স 5 প্রিপেয়ার্ড কোয়েরি (prepared query) কয়েকটি ট্যাগ দিয়ে ফিল্টার করতে পারে। স্থানীয় ডেটাসেন্টারে কোনো হেলদি নোড না থাকলে এটি দূরের ডেটাসেন্টারকেও জিজ্ঞেস করতে পারে। Source 5সোর্স 5

Client-side and server-side discovery

Consul names two patterns Source 3সোর্স 3:

PatternWho does the work
Client-sideThe caller asks the catalog, gets the access information, chooses a healthy instance, and calls it directly.
Server-sideThe caller asks an intermediary. The intermediary asks the catalog and sends the request to an available instance.

Consul says the second way lets developers make applications lighter, because the discovery logic is central Source 3সোর্স 3. It also says that traditional load balancers are not built for fast registration and removal of services Source 3সোর্স 3.

সহজ English

Consul names two patterns: Source 3সোর্স 3

  • Client-side: the caller asks the catalog and gets the access information. It chooses a healthy instance and calls it directly.
  • Server-side: the caller asks an intermediary. The intermediary asks the catalog. It sends the request to an available instance.

Consul says the second way lets developers make applications lighter, because the discovery logic is central. Source 3সোর্স 3 It also says that traditional load balancers are not built for fast registration and removal of services. Source 3সোর্স 3

বাংলা ব্যাখ্যা

Consul দুটি প্যাটার্নের নাম বলে: Source 3সোর্স 3

  • ক্লায়েন্ট-সাইড (client-side): কলার ক্যাটালগকে জিজ্ঞেস করে এবং অ্যাক্সেস তথ্য পায়। সে একটি হেলদি ইনস্ট্যান্স বেছে নেয় এবং সরাসরি তাকে কল করে।
  • সার্ভার-সাইড (server-side): কলার একজন মধ্যস্থতাকারীকে (intermediary) জিজ্ঞেস করে। মধ্যস্থতাকারী ক্যাটালগকে জিজ্ঞেস করে। সে একটি অ্যাভেইলেবল ইনস্ট্যান্সে রিকুয়েস্ট পাঠায়।

Consul বলে, দ্বিতীয় উপায়ে ডেভেলপাররা অ্যাপ্লিকেশন হালকা করতে পারে, কারণ ডিসকভারি লজিক কেন্দ্রীয়। Source 3সোর্স 3 এটি আরও বলে, প্রথাগত লোড ব্যালেন্সার দ্রুত সার্ভিস রেজিস্টার ও সরানোর জন্য তৈরি নয়। Source 3সোর্স 3

A real-life example

This example is the tutorial's own. A test platform has a results-api with three instances. A CI job posts results to the name results-api, never to an address.

During a release, one instance stops and a new one starts. The registry removes the old entry and adds the new one. If the new instance fails its health check, it stays out of the pool, and the CI job keeps using the other two. The CI job needs no change and no restart.

সহজ English

This example is the tutorial's own. A test platform has a results-api with three instances. A CI job posts results to the name results-api. It never posts to an address.

During a release, one instance stops and a new one starts. The registry removes the old entry and adds the new one. If the new instance fails its health check, it stays out of the pool. The CI job keeps using the other two. The CI job needs no change and no restart.

বাংলা ব্যাখ্যা

এই উদাহরণটি টিউটোরিয়ালের নিজের। একটি টেস্ট প্ল্যাটফর্মে তিনটি ইনস্ট্যান্স সহ একটি results-api আছে। একটি CI জব results-api নামে রেজাল্ট পোস্ট করে। সে কখনো অ্যাড্রেসে পোস্ট করে না।

একটি রিলিজের সময় একটি ইনস্ট্যান্স বন্ধ হয় এবং একটি নতুন শুরু হয়। রেজিস্ট্রি পুরনো এন্ট্রি সরায় এবং নতুনটি যোগ করে। নতুন ইনস্ট্যান্স হেলথ চেকে ব্যর্থ হলে সে পুলের বাইরে থাকে। CI জব বাকি দুটি ব্যবহার করে যায়। CI জবকে বদলাতে বা রিস্টার্ট করতে হয় না।

Common mistakes

  • Hard-coding an address. The address of an instance can change from one moment to the next Source 1সোর্স 1.
  • Using a short name from the wrong namespace. In Kubernetes a name without a namespace stays in the Pod's namespace Source 2সোর্স 2.
  • Reading discovery variables too early. In Kubernetes the Service must exist before the Pod that reads its environment variables Source 1সোর্স 1.
  • Trusting an unverified instance. Consul starts a check as critical so that an unverified service stays out of the pool Source 4সোর্স 4.

সহজ English

  • Hard-coding an address. The address of an instance can change from one moment to the next. Source 1সোর্স 1
  • Using a short name from the wrong namespace. In Kubernetes, a name without a namespace stays in the namespace of the Pod. Source 2সোর্স 2
  • Reading discovery variables too early. In Kubernetes, the Service must exist before the Pod that reads its environment variables. Source 1সোর্স 1
  • Trusting an unverified instance. Consul starts a check as critical. So an unverified service stays out of the pool. Source 4সোর্স 4

বাংলা ব্যাখ্যা

  • অ্যাড্রেস হার্ড-কোড করা। একটি ইনস্ট্যান্সের অ্যাড্রেস এক মুহূর্ত থেকে আরেক মুহূর্তে বদলাতে পারে। Source 1সোর্স 1
  • ভুল namespace থেকে একটি ছোট নাম ব্যবহার করা। Kubernetes-এ namespace ছাড়া একটি নাম Pod-এর namespace-এই থাকে। Source 2সোর্স 2
  • ডিসকভারি ভেরিয়েবল খুব আগে পড়া। Kubernetes-এ যে Pod এনভায়রনমেন্ট ভেরিয়েবল পড়ে, তার আগে Service থাকতে হয়। Source 1সোর্স 1
  • যাচাই না হওয়া ইনস্ট্যান্সকে বিশ্বাস করা। Consul একটি চেক ক্রিটিক্যাল হিসেবে শুরু করে। তাই যাচাই না হওয়া সার্ভিস পুলের বাইরে থাকে। Source 4সোর্স 4

What a tester can check

Tutorial advice

These test ideas are the tutorial's own advice, not a claim of a source.

  • Stop one instance. Check that callers stop getting that instance, and that the failed requests are few and handled.
  • Start a new instance. Check that it gets traffic only after it is healthy.
  • Break the health check. Make the check fail while the process still runs, and check that the instance leaves the pool. Then make the process fail while the check still passes, and see what happens.
  • Look up the name. From inside the system, resolve the service name in the same namespace and in another one. Check the answers.
  • Remove the registry. Make it unreachable for a short time. Check whether callers keep working with what they know, and whether they recover.
  • Watch for old answers. After a change, check how long a cache keeps the old address.

সহজ English

Tutorial advice

These test ideas are the tutorial's own advice. They are not a claim of a source.

  • Stop one instance. Check that callers stop getting that instance. Check that the failed requests are few and handled.
  • Start a new instance. Check that it gets traffic only after it is healthy.
  • Break the health check. Make the check fail while the process still runs. Check that the instance leaves the pool. Then make the process fail while the check still passes. See what happens.
  • Look up the name. From inside the system, resolve the service name in the same namespace and in another one. Check the answers.
  • Remove the registry. Make it unreachable for a short time. Check whether callers keep working with what they know. Check whether they recover.
  • Watch for old answers. After a change, check how long a cache keeps the old address.

বাংলা ব্যাখ্যা

Tutorial advice

এই টেস্ট ধারণাগুলো টিউটোরিয়ালের নিজের পরামর্শ। এগুলো কোনো সোর্সের দাবি নয়।

  • একটি ইনস্ট্যান্স বন্ধ করুন। দেখুন, কলাররা ওই ইনস্ট্যান্স পাওয়া বন্ধ করে কি না। দেখুন, ব্যর্থ রিকুয়েস্ট কম এবং সামলানো হয় কি না।
  • একটি নতুন ইনস্ট্যান্স চালু করুন। দেখুন, সে হেলদি হওয়ার পরেই ট্রাফিক পায় কি না।
  • হেলথ চেক ভাঙুন। প্রসেস চলতে থাকা অবস্থায় চেক ব্যর্থ করান। দেখুন, ইনস্ট্যান্স পুল ছেড়ে যায় কি না। তারপর চেক পাস করতে থাকা অবস্থায় প্রসেস ব্যর্থ করান। কী হয় দেখুন।
  • নামটি লুকআপ করুন। সিস্টেমের ভেতর থেকে একই namespace-এ এবং অন্য একটিতে সার্ভিসের নাম রিজলভ করুন। উত্তরগুলো দেখুন।
  • রেজিস্ট্রি সরান। অল্প সময়ের জন্য এটি অগম্য করুন। দেখুন, কলাররা যা জানে তা দিয়ে কাজ চালিয়ে যায় কি না। দেখুন, তারা সেরে ওঠে কি না।
  • পুরনো উত্তরের দিকে নজর রাখুন। পরিবর্তনের পরে দেখুন, একটি ক্যাশ কতক্ষণ পুরনো অ্যাড্রেস রাখে।

Key words

WordMeaning
Service discoveryA way for services to find the access information of other services Source 3সোর্স 3
Service catalogThe record of services that Consul keeps, one source of truth Source 3সোর্স 3
InstanceOne running copy of a service
Health checkA test of whether a service or node is healthy Source 4সোর্স 4
TTL checkA passive Consul check that needs regular updates from the service Source 4সোর্স 4
Service (Kubernetes)An object that exposes a group of Pods on the network Source 1সোর্স 1
Headless ServiceA Kubernetes Service with no cluster IP, whose name lists the Pod IPs Source 2সোর্স 2
SRV recordA DNS record that gives a port number and a name for a named port Source 2সোর্স 2
Client-side discoveryThe caller finds and picks an instance Source 3সোর্স 3
Server-side discoveryAn intermediary finds an instance and sends the request Source 3সোর্স 3
  1. [1]
    Service

    Kubernetes documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  2. [2]
    DNS for Services and Pods

    Kubernetes documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  3. [3]
    What is service discovery?

    HashiCorp, Consul documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  4. [4]
    Define health checks

    HashiCorp, Consul documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  5. [5]
    Consul DNS overview

    HashiCorp, Consul documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22