WP API from a subfolder
first of all I work in a subfolder in the wordpress root folder an I’m a beginner in AWS
So my job is to make a back office for some of our clients, since we plan from moving out a wordpress in the next year I try to avoid connecting it deeply to WP (long story short, made an app using WP API, except for the admin part we have 3 pages left on the website)
To do so I worked using $_SESSION (since our API is currently using basic auth) and nearly completed the whole project, but the thing is the staging is not clustered while the prod is clustered (elastic beanstalk with min 3 EC-2)
In case someone didn’t go it, I was setting $_SESSION and jumping from server to server
So now I have 4 solutions and would like to have advice on which one to use or a better one
1: Use Elastic Cache:
not the best option imho since it would cost money
2: sticky session:
can it affect the UX since they stick to one of the server ?
what would happen if we have enough user so it start a new instance but then they logout and we are left with 1 person on each server ? Will one of the serv just shut down and kick the user ?
3: find a way to include nonce (like wpApiSettings)
4: session/local storage : but I wouldn’t be able to make php request to speed up the display