Quick Contact


    SALESFORCE MULTITENANT ARCHITECTURE

    SALESFORCE MULTITENANT ARCHITECTURE

    Salesforce is trusted infrastructure. As there are multiple infrastructures which then make unifies service delivery that is seamless to the customers when you will use all the different clouds.

    Multitenancy (one cloud with many services) means one cloud for many customers. Salesforce has over 150,000 paying customers today and 75 production instances. Instance is basically a lump of technology- database servers, app servers, web servers, search servers etc. These instances are where you run your version of Salesforce, its one code base, one database and your stuff runs inside that environment.

    SALESFORCE MULTITENANT ARCHITECTURE

    Instance has platform services, which are basically Salesforce code that supports what you do. So, there’s one version of code.

    • To separate your data from anybody else’s data is by using “org ID”, the organization ID of 18 character unique code and that code is used in database in both the metadata and data tables.
    • Where metadata is data about data, metadata is the main information like version of Salesforce.

    When you do some changes in metadata then you write some code stored in metadata your process builder is sort of metadata. As data is version of metadata and version of Salesforce data that make version of Salesforce yours.

    SALESFORCE MULTITENANT ARCHITECTURE
    1. If you say Salesforce has one version then it’s not true, Salesforce has two versions. Latest version is always used.
    2. As three versions releases every year and benefit is about innovation that happens. You get 400 to 500 different new features every release.
    3. Instance architecture makes easy to do release every instance on our rolling basis so over space about a week. Actually there is a time period when sandboxes in the production of are out of sync but that’s because you have the pre look at the next version of Salesforce.
    4. In automation hundred and thousands of tests are run across Salesforce. So, before release version of Salesforce is first checked. It’s got to be performant, secure and is improved.
    ARCHITECTURAL PRINCIPLES
    1. Stateless app servers are used, means every time you make request via API of where the screen or mobile phone device.
    2. Database record system
    3. In database record system you don’t do any data definition language (DDL), so no table and field is created at runtime at all that’s only do during upgrade cycles in which there are primary keys.
    4. The first three characters of record ID actually determined what object it comes from.
    5. Actually Oracle is used under the covers to actually run Salesforce as relational database, Hadoop is also used as well but under the covers with Oracle every trick is used to work Oracle quickly because Oracle is not designed to work in multi-tenant manner.’
    6. There are creative de-normalization and pivoting.
    7. In this every RDBMS feature is used as well as the optimization.
    DATA STRUCTURE
    SALESFORCE MULTITENANT ARCHITECTURE

    So in middle you have the data of people in data objects. So there are metadata tables, pivot table structure which store data corresponding to virtual data structures as all defined in above diagram.

    So what happens is-:
    SALESFORCE MULTITENANT ARCHITECTURE

    In object table you got object ID, org ID, objName which are able to be used in reports all that sort of attributes you see when you create an object that’s stored in object table.

    In field table you have field ID, org ID etc. as in above diagram. So, in field table Field number is important because as you go left you see you got value 1 to value 3 except at value 500. So, whenever you create a field at all then you are creating record in the field table which them a point to an empty value column in the data table and away you go, so fields point to your data that’s how it works.

    SALESFORCE MULTITENANT ARCHITECTURE
    In real world data looks like-:
    SALESFORCE MULTITENANT ARCHITECTURE
    Indexes and unique indexes

    – INDEXES

    SALESFORCE MULTITENANT ARCHITECTURE

    As if everything is a character you can’t sort it, because character one actually sorts in a weird order. If you have zero one two three four zero nine, ten comes before nine, if you do it in characters then it doesn’t really helps. So, there is another table called index and you copy the data out of the data table into the index table into the right type. So when you do a query on index get the org ID and object ID by this is fetched.

    UNIQUE INDEXES

    It is same as normal index but it is marked as unique containing different relationships. It facilitates uniqueness for custom fields.

    SALESFORCE MULTITENANT ARCHITECTURE
    Partitioning of Performance

    In this all metadata and data structures are partitioned to improve performance and manageability as-:

    • Org ID contain hash function in which table hash is partitioned by org ID that is each ID contained its own hash function.
    • Connected pools point separate to physical host.
    • Org ID dynamically do partition in App tier.
    Multitenant Query Optimizer

    If you wrote a soccer query for the all opportunities where the opportunity ID equals to (=) 7. It processed quick because equal to sign created no problem, signs optimize the query correctly. In Salesforce it depends upon where you are on the role hierarchy as how much data you can see.

    SALESFORCE MULTITENANT ARCHITECTURE
    User visibility= Number of rows (data) you or user can access.

    Filter selectivity= in this there is equal sign or not, it’s always use index because it make process faster or another way is you do a whole bunch of queries of the metadata to understand what you are actually asking for then a sequel query is build with org ID and run that against the Oracle database to pull back the data to then make it into your output. It’s pretty complex stuff and you do it under one fifth of a second every trip, every two requests you make.

    MULTITENANT SEARCH

    When you do a search in Salesforce so the global search at the top or if you use a query that use the search capabilities not Oracle, you actually store a search index outside, you use something called solar, open source technology and the data is copy all the text out of your records and stick it in solar index. You also take the contents of PDFs, Word files, Excel spreadsheets that sort of stuff and copy them out over. At the top of Salesforce it will actually find everything- chat, records, files you name it, it will find it. It will also search outside of Salesforce, now because you have files connect. So, you would connect to google and you get your surgery google files so all that stuff comes free of charge with the platform so that sort of capabilities is really quite powerful there’s something called FFX means file force extreme. You can’t just have file force right its far force extreme and basically that’s how you store this large objects. So, not only you use it for our multi research, you also use it for storing all of your attachments because storing them in Oracle database doesn’t make much sense. You store them out on a file system and manage it.

    SALESFORCE MULTITENANT ARCHITECTURE

    You replicate across to backup instance, so you have primary in your backup so all that data is replicated across exactly the same way as your real data is replicated across.

    HIGHLY SCALABLE MULTITENANT ARCHITECTURE

    In this there is data center; actually your data is stored in two data centers, primary data center and fileover data center. What happens is, the data lives in one of these instances in which each little cube is an instance. It has different instance groups like NA 45, NA 50 and NA 73. Instance is a group of four cores.

    SALESFORCE MULTITENANT ARCHITECTURE
    Instance-:
    • It has consistent deployment size
    • It is easy to scale that is to cope with errors.
    • It is quite repeatable.
    Instance Groups-:
    • It shared the services isolation within a data center.
    Data Centers-:
    • Data centers are consistent for the production as well as recovery of disaster.
    • It helps in sharing services across the data centers.
    Instance works as-:
    SALESFORCE MULTITENANT ARCHITECTURE

    Enroll Yourself in Live Classes For Salesforce Training in Noida.

    Copyright 1999- Ducat Creative, All rights reserved.