Set up multiple Airflow instances under the same domain with different sessions
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 483
Description
**Apache Airflow version**: v2.1.1
**OS**: Ubuntu 20.04.2 LTS
**Apache Airflow Provider versions**: Not relevent
**Deployment**: AWS EC2 Instances
**What happened**: When using multiple Airflow instances (i.e. Production instance and a Development instance) the webserver navigation/redirection can send you back to the incorrect instance.
**What you expected to happen**: I expect when I press "Back" or "Save" within Airflow (for instance, when editing a 'pool' from the GUI' that it goes back to the previous page (of the instance I am working on, not a different instance that I happen to also be working with at the same time).
**How to reproduce it**: It seems both webserver instances are using the same cookie or session information. I am using a single NGINX reverse proxy to access both a dev instance and a prod instance (but with a unique URL to differentiate the two)..
Example URLs:
https://ec2-myIP.eu-central-1.compute.amazonaws.com/airflow [ points to the PRODUCTION instance ]
https://ec2-myIP.eu-central-1.compute.amazonaws.com/airflow_dev [ points to the DEVELOPMENT instance ]
Example ISSUE (using pools as an example, but it is not limited there):
1. On PRODUCTION instance browse to Admin->Pools
2. On DEVELOPMENT instance browse to Admin->Pools
3. On PRODUCTION instance click Airflows Back navigation arrow/button
4. On DEVELOPMENT instance browse to Admin->Pools, edit a pool, then click Airflows Back navigation arrow/button
Note that the "Save" button can redirect back to the other instance as well (just depends).
**Anything else we need to know**: Issue occurs frequently when using two independent instances of Airflow. There are no logs to speak of.
**Are you willing to submit a PR?**
Contributor guide
Research direction
Reproduce the issue through the Airflow webserver behind the NGINX reverse proxy, using the production and development pool pages and their Back and Save actions. Inspect how the two /airflow and /airflow_dev entry points handle sessions and redirects. Done means both instances retain separate session information and navigation never sends an action to the other instance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx, python
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100