Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dhanesh Kumar MJ 158 posts 511 karma points c-trib
    Aug 16, 2021 @ 13:15
    Dhanesh Kumar MJ
    2

    Custom Indexer with External Data, returning different results against browser session?

    Hi @all

    Umbraco Version: 8.14.2

    Env: Azure Web App

    Followed recommended settings: https://our.umbraco.com/Documentation/Fundamentals/Setup/server-setup/azure-web-apps#recommended-configuration

    Created a custom index as per the doc here https://gist.github.com/hartviglarsen/44743b32d4eea8eda3fb6d49b60dd547 and it's working fine as expected in my local environment, but it's not working as expected in DEV(Azure).

    ISSUE: The custom indexer is changing against the browser session & that's weird. For example: if we login to the Umbraco from a browser with normal mode and indexed successfully and tried to login from another browser or in incognito mode then go to examine settings and we can't see the indexed data, it is changing against the browser session.


    PFA


    Before indexing from the browser (session 1) Before indexing Normal mode

    Tried indexing from the browser (session 1) and successfully indexed.

    Tried indexing from the browser (normal mode)

    And if we try to search from the same browser session(session 1) then the result will show correctly, but if tried to login from another session (incognito mode), then it show's the data is not indexed :(

    enter image description here

    Please find this video for more info : VIDEO

    Regards Dhanesh

  • Steve Temple 63 posts 324 karma points MVP 3x c-trib
    Aug 17, 2021 @ 10:32
    Steve Temple
    0

    Is this a single App Service instance, or multiple load balanced app services?

    My guess is you're being sent to different instances and one has it indexed and the other does not.

  • Dhanesh Kumar MJ 158 posts 511 karma points c-trib
    Aug 17, 2021 @ 10:39
    Dhanesh Kumar MJ
    0

    Thanks @steve for the reply

    We are using a Single App Service instance.

  • Steve Temple 63 posts 324 karma points MVP 3x c-trib
    Aug 17, 2021 @ 10:47
    Steve Temple
    0

    And it's not scaled out at all?

    Like this?

    If that's the case, then refreshing the non-incognito one still shows it as having docs indexed?

  • Dhanesh Kumar MJ 158 posts 511 karma points c-trib
    Aug 17, 2021 @ 11:20
    Dhanesh Kumar MJ
    0

    Yes @steve you are right, using scaling for this environment, even if the scaling is enabled, do we need to do some code change or configuration changes?

    PFAenter image description here

  • Steve Temple 63 posts 324 karma points MVP 3x c-trib
    Aug 17, 2021 @ 11:27
    Steve Temple
    2

    First off. You should only be using the backoffice in a single instance, we setup 2 app service plans. One for the backoffice and one which scales for the front end site.

    The back office one uses the SyncTempEnvDirectoryFactory and the front end one uses TempEnvDirectoryFactory. https://our.umbraco.com/Documentation/Fundamentals/Setup/Server-Setup/Load-Balancing/file-system-replication#mixture-of-standalone--synchronised

  • Vidyesh 5 posts 85 karma points c-trib
    Aug 18, 2021 @ 16:42
    Vidyesh
    0

    I doubt if this will work.

    The indexed files will be in the backoffice app service instance, so how can the front end instance access these ?

  • Steve Temple 63 posts 324 karma points MVP 3x c-trib
    Aug 19, 2021 @ 08:27
    Steve Temple
    1

    This is the way load balanced umbraco works.

    The front end instances each maintain their own examine indexes as does the backoffice instance. When a page is published a record is written into the DB to instruct all instances to update their cache and indexes with the latest version of that page.

Please Sign in or register to post replies

Write your reply to:

Draft