session - Azure web application (webapi) in Web Farm / Load balancing -


webform : in webform (with session) state application in web farm environment session stored in sql server storage can accessed servers in webfarm. means logged in user's request can same session regardless of server in farm hits.

webapi : understand webapi design stateless true webapi application dont need worry how state maintained etc. authentication token passed between requests , far valid login gets access whatever resource needs on server. fine 1 webserver hosting webapi. web farm. how "session" (or equivalent term in webapi) managed in webapi farm?

i know azure gives following options name few.. azure sql server azure table storage /queue cache service

they seems add complexity architecture (which easier in webform using sql server session).

one other different question (and might bit basic) how request/response traced in webapi farm? i.e. when client make request webapi , webapi sends async response how server make sure traced client?

edit: not looking implement session webapi rather how same thing can achieved in webapi without session state.

thanks

yes. using session in rest bad thing.

but can simulate session in web api well. in web form, server added generated session id in html when user submit session id included in request. can simulate same thing web api well. can check accessing session using asp.net web api

the best can store information in memcached or redis expiration. work in web farm well.

anyways, don't recommend using "session" in web api.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -