• r

    rp

    1 year ago
    Sounds good! Look forward to it, feel free to ask any questions you have
  • b

    bachras

    1 year ago
    Hi, I am still a little bit puzzled how supertokens will work with multiple instances. I have two AWS EC2 instances, one in US and on in Europe. Route53 directs user request to the instance which is closer to the user location. US users most likely will hit US instance and most of the world will hit Europe instance. Europe instance has master mysql database, requests coming to Europe instance read and write to master database on the same instance. Requests coming to US instance reads from slave database on the same instance, but writes to Europe instance master database (Laravel DB config, read/write DB hosts are different). Question: how to setup supertokens on US instance? Do I have just change configuration file and point to master database on Europe instance? From what I understood if blacklisting is disabled, supertokens won't query database on every request. Is it the case? As I don't want to query master database for US user request where only read DB functionality is required (GET requests). Thank you
  • r

    rp

    1 year ago
    how to setup supertokens on US instance? Do I have just change configuration file and point to master database on Europe instance? We don't support reading and writing from a different instances at the moment. This means:
    You can run a SuperTokens instance in Europe, talking to the master MySQL instance in Europe. Your backend code (in both regions) will talk to that one ST instance (which is in Europe).
    From what I understood if blacklisting is disabled, supertokens won't query database on every request. Is it the case? Yes. This is correct. Session verification for most requests will happen without any networking (even without needing to query the core). This means super, super fast session verifications.
    In other cases (like when you create a new session, revoke one, or refresh one), the ST instance in Europe will be queried, which will be a little slow (for US region), but that is OK since these requests are relatively rare.
  • b

    bachras

    1 year ago
    I see
  • b

    bachras

    1 year ago
    Your backend code (in both regions) will talk to that one ST instance (which is in Europe).
  • b

    bachras

    1 year ago
    How US instance will how that it has to talk to ST instance in EUrope
  • b

    bachras

    1 year ago
    what ST setup is required on US instance
  • b

    bachras

    1 year ago
    ?
  • b

    bachras

    1 year ago
    I just change host in supertokens config file in Laravel, yes?
  • r

    rp

    1 year ago
    You do not need to run ST core in the US region. Only in Eurpoe region