Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
What happens if your server does XHR to itself?

I was digging into server side rendering with Angular this week. It seems architected to be totally isomorphic, so if you are getting data on the server or the client, it's the same line of code that runs. Therefore it would make a call like this.http.get('http://www.example.com/myurl'); where this.http would be an instance of Http from @angular/http.

On the client side, this is super clear. It means the browser is making an XHR request to my server.

On the server side... what is actually happening behind the scenes? I imagine the node server, being completely unaware of its domain, will make a regular http request, with DNS lookup and everything, just to find itself?

Is that accurate?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

All comments point to the answer of the question being that your server will reach out for DNS call to come back and hit itself.

Since I was curious about this to know about performance, I did a test like this: time curl -v http://[mydomain].us-east-1.elb.amazonaws.com/testedself.

The endpoint is just an express endpoint with res.send('Hello World');. The extra time is ~10MS in this specific test.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda