|
1 | 1 | --- |
2 | | -title: Understanding DNS |
| 2 | +title: Entendiendo DNS |
3 | 3 | linktitle: DNS |
4 | | -description: How DNS interacts with Istio. |
| 4 | +description: Cómo el DNS interactúa con Istio. |
5 | 5 | weight: 31 |
6 | 6 | keywords: [traffic-management,proxy] |
7 | 7 | owner: istio/wg-networking-maintainers |
8 | 8 | test: n/a |
9 | 9 | --- |
10 | 10 |
|
11 | | -Istio interacts with DNS in different ways that can be confusing to understand. |
12 | | -This document provides a deep dive into how Istio and DNS work together. |
| 11 | +Istio interactúa con DNS de diferentes maneras que pueden ser confusas de entender. |
| 12 | +Este documento proporciona una inmersión profunda en cómo Istio y DNS trabajan juntos. |
13 | 13 |
|
14 | 14 | {{< warning >}} |
15 | | -This document describes low level implementation details. For a higher level overview, check out the traffic management [Concepts](/es/docs/concepts/traffic-management/) or [Tasks](/es/docs/tasks/traffic-management/) pages. |
| 15 | +Este documento describe detalles de implementación de bajo nivel. Para una visión general de más alto nivel, consulta las páginas de [Conceptos](/es/docs/concepts/traffic-management/) o [Tareas](/es/docs/tasks/traffic-management/) de gestión de tráfico. |
16 | 16 | {{< /warning >}} |
17 | 17 |
|
18 | | -## Life of a request |
| 18 | +## Vida de una solicitud |
19 | 19 |
|
20 | | -In these examples, we will walk through what happens when an application runs `curl example.com`. |
21 | | -While `curl` is used here, the same applies to almost all clients. |
| 20 | +En estos ejemplos, veremos lo que sucede cuando una aplicación ejecuta `curl example.com`. |
| 21 | +Aunque se usa `curl` aquí, lo mismo aplica a casi todos los clientes. |
22 | 22 |
|
23 | | -When you send a request to a domain, a client will do DNS resolution to resolve that to an IP address. |
24 | | -This happens regardless of any Istio settings, as Istio only intercepts networking traffic; it cannot change your application's behavior or decision to send a DNS request. |
25 | | -In the example below, `example.com` resolved to `192.0.2.0`. |
| 23 | +Cuando envías una solicitud a un dominio, un cliente hará resolución DNS para resolver eso a una dirección IP. |
| 24 | +Esto sucede independientemente de cualquier configuración de Istio, ya que Istio solo intercepta tráfico de red; no puede cambiar el comportamiento de tu aplicación o decisión de enviar una solicitud DNS. |
| 25 | +En el ejemplo a continuación, `example.com` se resolvió a `192.0.2.0`. |
26 | 26 |
|
27 | 27 | {{< text bash >}} |
28 | 28 | $ curl example.com -v |
29 | 29 | * Trying 192.0.2.0:80... |
30 | 30 | {{< /text >}} |
31 | 31 |
|
32 | | -Next, the request will be intercepted by Istio. |
33 | | -At this point, Istio will see both the hostname (from a `Host: example.com` header), and the destination address (`192.0.2.0:80`). |
34 | | -Istio uses this information to determine the intended destination. |
35 | | -[Understanding Traffic Routing](/es/docs/ops/configuration/traffic-management/traffic-routing/) gives a deep dive into how this behavior works. |
| 32 | +Después, la solicitud será interceptada por Istio. |
| 33 | +En este punto, Istio verá tanto el hostname (de un header `Host: example.com`), como la dirección de destino (`192.0.2.0:80`). |
| 34 | +Istio usa esta información para determinar el destino previsto. |
| 35 | +[Entendiendo el enruramiento de tráfico](/es/docs/ops/configuration/traffic-management/traffic-routing/) proporciona una inmersión profunda en cómo funciona este comportamiento. |
36 | 36 |
|
37 | | -If the client was unable to resolve the DNS request, the request would terminate before Istio receives it. |
38 | | -This means that if a request is sent to a hostname which is known to Istio (for example, by a `ServiceEntry`) but not to the DNS server, the request will fail. |
39 | | -Istio [DNS proxying](#dns-proxying) can change this behavior. |
| 37 | +Si el cliente no pudo resolver la solicitud DNS, la solicitud terminaría antes de que Istio la reciba. |
| 38 | +Esto significa que si se envía una solicitud a un hostname que es conocido por Istio (por ejemplo, por un `ServiceEntry`) pero no por el servidor DNS, la solicitud fallará. |
| 39 | +El [proxy DNS](#dns-proxying) de Istio puede cambiar este comportamiento. |
40 | 40 |
|
41 | | -Once Istio has identified the intended destination, it must choose which address to send to. |
42 | | -Because of Istio's advanced [load balancing capabilities](/es/docs/concepts/traffic-management/#load-balancing-options), this is often not the original IP address the client sent. |
43 | | -Depending on the service configuration, there are a few different ways Istio does this. |
| 41 | +Una vez que Istio ha identificado el destino previsto, debe elegir a qué dirección enviar. |
| 42 | +Debido a las [capacidades avanzadas de balanceamiento de carga](/es/docs/concepts/traffic-management/#load-balancing-options) de Istio, esto a menudo no es la dirección IP original que el cliente envió. |
| 43 | +Dependiendo de la configuración del servicio, hay algunas maneras diferentes en que Istio hace esto. |
44 | 44 |
|
45 | | -* Use the original IP address of the client (`192.0.2.0`, in the example above). |
46 | | - This is the case for `ServiceEntry` of type `resolution: NONE` (the default) and [headless `Services`](https://kubernetes.io/docs/concepts/services-networking/service/#headless-services). |
47 | | -* Load balance over a set of static IP addresses. |
48 | | - This is the case for `ServiceEntry` of type `resolution: STATIC`, where all `spec.endpoints` will be used, or for standard `Services`, where all `Endpoints` will be used. |
49 | | -* Periodically resolve an address using DNS, and load balance across all results. |
50 | | - This is the case for `ServiceEntry` of type `resolution: DNS`. |
| 45 | +* Usar la dirección IP original del cliente (`192.0.2.0`, en el ejemplo anterior). |
| 46 | + Este es el caso para `ServiceEntry` de tipo `resolution: NONE` (el predeterminado) y [Services `headless`](https://kubernetes.io/docs/concepts/services-networking/service/#headless-services). |
| 47 | +* Balancear la carga sobre un conjunto de direcciones IP estáticas. |
| 48 | + Este es el caso para `ServiceEntry` de tipo `resolution: STATIC`, donde se usarán todos los `spec.endpoints`, o para Services estándar, donde se usarán todos los `Endpoints`. |
| 49 | +* Resolver periódicamente una dirección usando DNS, y balancear la carga a través de todos los resultados. |
| 50 | + Este es el caso para `ServiceEntry` de tipo `resolution: DNS`. |
51 | 51 |
|
52 | | -Note that in all cases, DNS resolution within the Istio proxy is orthogonal to DNS resolution in a user application. |
53 | | -Even when the client does DNS resolution, the proxy may ignore the resolved IP address and use its own, which could be from |
54 | | -a static list of IPs or by doing its own DNS resolution (potentially of the same hostname or a different one). |
| 52 | +Nota que en todos los casos, la resolución DNS dentro del proxy de Istio es ortogonal a la resolución DNS en una aplicación de usuario. |
| 53 | +Incluso cuando el cliente hace resolución DNS, el proxy puede ignorar la dirección IP resuelta y usar la suya propia, que podría ser de |
| 54 | +una lista estática de IPs o haciendo su propia resolución DNS (potencialmente del mismo hostname o uno diferente). |
55 | 55 |
|
56 | | -## Proxy DNS resolution |
| 56 | +## Resolución DNS del proxy |
57 | 57 |
|
58 | | -Unlike most clients, which will do DNS requests on demand at the time of requests (and then typically cache the results), |
59 | | -the Istio proxy never does synchronous DNS requests. |
60 | | -When a `resolution: DNS` type `ServiceEntry` is configured, the proxy will periodically resolve the configured hostnames and use those for all requests. |
61 | | -This interval is fixed at 30 seconds and cannot be changed at this time. |
62 | | -This happens even if the proxy never sends any requests to these applications. |
| 58 | +A diferencia de la mayoría de los clientes, que harán solicitudes DNS bajo demanda en el momento de las solicitudes (y luego típicamente cachear los resultados), |
| 59 | +el proxy de Istio nunca hace solicitudes DNS síncronas. |
| 60 | +Cuando se configura un `ServiceEntry` de tipo `resolution: DNS`, el proxy resolverá periódicamente los hostnames configurados y usará esos para todas las solicitudes. |
| 61 | +Este intervalo está fijado en 30 segundos y no puede cambiarse en este momento. |
| 62 | +Esto sucede incluso si el proxy nunca envía ninguna solicitud a estas aplicaciones. |
63 | 63 |
|
64 | | -For meshes with many proxies or many `resolution: DNS` type `ServiceEntries`, especially when low `TTL`s are used, this may cause a high load on DNS servers. |
65 | | -In these cases, the following can help reduce the load: |
| 64 | +Para meshes con muchos proxies o muchos `ServiceEntries` de tipo `resolution: DNS`, especialmente cuando se usan `TTL`s bajos, esto puede causar una alta carga en los servidores DNS. |
| 65 | +En estos casos, lo siguiente puede ayudar a reducir la carga: |
66 | 66 |
|
67 | | -* Switch to `resolution: NONE` to avoid proxy DNS lookups entirely. This is suitable for many use cases. |
68 | | -* If you control the domains being resolved, increase their TTL. |
69 | | -* If your `ServiceEntry` is only needed by a few workloads, limit its scope with `exportTo` or a [`Sidecar`](/es/docs/reference/config/networking/sidecar/). |
| 67 | +* Cambiar a `resolution: NONE` para evitar lookups DNS del proxy completamente. Esto es adecuado para muchos casos de uso. |
| 68 | +* Si controlas los dominios que están siendo resueltos, aumenta su TTL. |
| 69 | +* Si tu `ServiceEntry` solo es necesario por algunos workloads, limita su alcance con `exportTo` o un [`Sidecar`](/es/docs/reference/config/networking/sidecar/). |
70 | 70 |
|
71 | 71 | ## DNS Proxying |
72 | 72 |
|
73 | | -Istio offers a feature to [proxy DNS requests](/es/docs/ops/configuration/traffic-management/dns-proxy/). |
74 | | -This allows Istio to capture DNS requests sent by the client and return a response directly. |
75 | | -This can improve DNS latency, reduce load, and allow `ServiceEntries`, which otherwise would not be known to `kube-dns`, to be resolved. |
| 73 | +Istio ofrece una característica para [solicitudes DNS proxy](/es/docs/ops/configuration/traffic-management/dns-proxy/). |
| 74 | +Esto permite a Istio capturar solicitudes DNS enviadas por el cliente y retornar una respuesta directamente. |
| 75 | +Esto puede mejorar la latencia DNS, reducir la carga, y permitir que `ServiceEntries`, que de otra manera no serían conocidos por `kube-dns`, sean resueltos. |
76 | 76 |
|
77 | | -Note this proxying only applies to DNS requests sent by user applications; when `resolution: DNS` type `ServiceEntries` are used, |
78 | | -the proxy has no impact on the DNS resolution of the Istio proxy. |
| 77 | +Nota que este proxying solo aplica a solicitudes DNS enviadas por aplicaciones de usuario; cuando se usan `ServiceEntries` de tipo `resolution: DNS`, |
| 78 | +el proxy no tiene impacto en la resolución DNS del proxy de Istio. |
0 commit comments