Open thwayant opened 9 months ago
I suggest:
As for monitoring, this backend is already instrumented with OpenTelemetry, so you should see stats show up in Azure Monitor. You can filter the "requests" table per "url" column. For more advanced monitoring, consult the Application Insights docs.
You could also look into APIM as a way of proxying requests, but that may end up incurring more costs than desired.
I suggest:
* Store each frontend's data in a different index (you could also use search fields with filters, but if the data is different enough, I think a separate index makes sense). * Adding a mapping in the backend from frontend domain to search index, to make sure you send back data from the right index. You'll need to propagate that index to the approach files instead of configuring it globally, as it's done now. * Deploy frontends using Static Web Apps. https://github.com/Azure-Samples/azure-search-openai-javascript is already designed for deployment on SWA so you may want to use that, as it will be cheaper than running each frontend on App Service. You can also deploy this frontend to SWA or to separate App Service instances if preferred.
As for monitoring, this backend is already instrumented with OpenTelemetry, so you should see stats show up in Azure Monitor. You can filter the "requests" table per "url" column. For more advanced monitoring, consult the Application Insights docs.
You could also look into APIM as a way of proxying requests, but that may end up incurring more costs than desired.
Thank you, if possible can you elaborate a bit more on the second point about adding a mapping, also how do i deploy only the backend, will it work with SWA or do i stick with App Service for running the backend?
Again Thank you, this helps alot!
By a mapping, I meant a Python dictionary, like {"frontend-domain": "index"}, and you could extract the referrer from the request. Referrers can be faked, so you'd likely want additional forms of verification/authentication if they're accessing private data.
As for deploying only the backend from this repo, you could delete the prepackage route from azure.yaml and the / and /asserts routes in app.py. That would affectively give you an App Service backend with no Node frontend.
Thank You,this is very helpful.
On Tue, Jan 23, 2024 at 12:25 AM Pamela Fox @.***> wrote:
By a mapping, I meant a Python dictionary, like {"frontend-domain": "index"}, and you could extract the referrer from the request. Referrers can be faked, so you'd likely want additional forms of verification/authentication if they're accessing private data.
As for deploying only the backend from this repo, you could delete the prepackage route from azure.yaml and the / and /asserts routes in app.py. That would affectively give you an App Service backend with no Node frontend.
— Reply to this email directly, view it on GitHub https://github.com/Azure-Samples/azure-search-openai-demo/issues/1146#issuecomment-1904611371, or unsubscribe https://github.com/notifications/unsubscribe-auth/A22UKSXMU6TNAPTSXJH5LYTYP2Y2FAVCNFSM6AAAAABB6KB7TOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUGYYTCMZXGE . You are receiving this because you authored the thread.Message ID: @.***>
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
Expected/desired behavior
Hi, what should i do to connect multiple frontend to this backend, each frontend is able to chat with its own data only, monitoring which frontend is using what amount of resources, and how would i deploy only the backend using azure?
Any help is greatly appreciated. Thanks!!
OS and Version?
azd version?
Versions
Mention any other details that might be useful