{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • API Design /
avatar image
0
Question by Max M · Jan 09, 2020 at 10:22 PM · 86 Views proxy configurationtarget endpointtarget path urlcontext set variable

Getting responses from different targets - how is this possible?

I have a JS script that does some URL rewriting (via setting context variable for target.url). The script is straightforward. I'll be specific and won't leave anything out. It strips a part of the path to build the hostname.

Example:

https://api.stuff.com/customer1/items/123

rewrites to:

https://customer1.stuff.com/items/123

This has been working for the last year. However, for the last 2 months, I've been seeing weird behavior. Intermittently, a request to customer1 would get the response of a request to customer2 (I know this because the Host header of the response is that of customer2.stuff.com).

There is no response caching, so Apigee would be "stateless" as far as I know. It's just a straightforward rewrite. I do not store any of the names on Apigee or the rewrite script. So how would a request to customer1 know of a customer2?

What's even weirder is that based on the response headers coming back, the response is from a few days before. So I don't think it's a race condition/concurrency issue. I've put a lot of traffic through but cannot reproduce on-demand. It's rare, but it happens.

Any thoughts?

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
0

Answer by Dino-at-Google   · Jan 09, 2020 at 11:48 PM

It's possible for the problem to not be in your code, or in Apigee. It could be that the virtual-IP that sits in front of "customerX.stuff.com" is misconfigured or misbehaving.

In other words, the upstream firewall might receive a request on "https://customer1.stuff.com" and it might route it incorrectly to a system for customer2. Or something analogous to that.

A second possibility I can imagine is that there is a cache somewhere. Either in Apigee, or behind it (between Apigee and Upstream) , or in the upstream system. And that cache is using an incorrect cache key.

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Max M · Jan 10, 2020 at 04:26 AM 0
Link

Interesting thought. I'll try to look for something like that. Thanks!

Follow this Question

Answers Answers and Comments

67 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Overriding target.basepath and target.url via Javascript worked previously, but now not 3 Answers

Best Practice for API Proxy that exposes multiple resource paths and proxies to multiple endpoints 1 Answer

How to call a local proxy after getting the data from a microservice 2 Answers

Target End points 1 Answer

Difficulties enabling response streaming 2 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges