L2 Cache Questions

Thread is closed for posting
7 posts, 0 answers
  1. AndrePereira
    AndrePereira avatar
    6 posts
    Member since:
    Apr 2015

    Posted 09 Aug 2017 Link to this post

    Hello,

    Im trying to implement the L2 Cache on an existing system, that uses a load balancer, distributing the load between 2 machines.

    My web site will be on both machines, but i cannot get the machines to synchronize between them...
    here is the backend code im using:

    backend.Backend = "MsSql";
                backend.ProviderName = "System.Data.SqlClient";
                backend.Runtime.ReturnNullForRowNotFound = true;

                backend.Logging.MetricStoreSnapshotInterval = 0;
                backend.SecondLevelCache.Enabled = true;
                backend.SecondLevelCache.CacheQueryResults = true;
                backend.SecondLevelCache.NumberOfObjects = 100000;
                backend.SecondLevelCache.NumberOfObjectsPerQueryResults = 200000;
                backend.SecondLevelCache.NumberOfQueryResults = 50000;

                backend.SecondLevelCache.Synchronization.Enabled = true;
                backend.SecondLevelCache.Synchronization.Localpath =
                                  "Et_Cache_" + Environment.MachineName;
                backend.SecondLevelCache.Synchronization.MulticastAddress = "224.1.1.1:666";
                backend.SecondLevelCache.Synchronization.Name = "MSMQ";

    The caching system seems to be working fine, when is only on one machine, but the changes i make on one machine, do not reflect on the other.

    Am I doing something wrong, or i misunderstood how the distributed L2 cache is supposed to work?

    Cheers

  2. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    324 posts

    Posted 11 Aug 2017 Link to this post

    Hello,

    So far the code you have posted looks fine.

    Please check if ports are open through your firewall on both servers after installing MSMQ Windows component and check the documentation for the special case with multiple network cards.

    Regards,
    Viktor Zhivkov
    Progress Telerik
    Telerik Data Access is no longer being developed. For more information please refer to this page.
  3. AndrePereira
    AndrePereira avatar
    6 posts
    Member since:
    Apr 2015

    Posted 14 Aug 2017 in reply to Viktor Zhivkov Link to this post

    Hi Viktor, thanks for your reply.

     

    I have opened ports 2103 and 2105 on both servers, and i have added the network card ip address to the registry in both machines.

    Still no success in the cache synchronization.

     

    Is any other tip, that you can think that might be wrong?

  4. AndrePereira
    AndrePereira avatar
    6 posts
    Member since:
    Apr 2015

    Posted 14 Aug 2017 Link to this post

    I was able to activate the journal for the messages, and i found the following soap envelop there:

     

    <se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/srmp/">
        <se:Header>
            <path xmlns="http://schemas.xmlsoap.org/rp/" se:mustUnderstand="1">
                <action>
                    MSMQ:6318ac69-bb45-4221-8879-bde0bde69c48
                </action>
                <to>
                    MSMQ:MULTICAST=224.1.1.1:666
                </to>
                <id>
                    uuid:4157@5d9fa70a-94b1-4535-9574-f4051fbe3b68
                </id>
            </path>
            <properties se:mustUnderstand="1">
                <expiresAt>
                    20170814T164027
                </expiresAt>
                <sentAt>
                    20170814T163825
                </sentAt>
            </properties>
            <Msmq xmlns="msmq.namespace.xml">
                <Class>
                    0
                </Class>
                <Priority>
                    3
                </Priority>
                <Correlation>
                    AAAAAAAAAAAAAAAAAAAAAAAAAAA=
                </Correlation>
                <ConnectorType>
                    6318ac69-bb45-4221-8879-bde0bde69c48
                </ConnectorType>
                <App>
                    0
                </App>
                <BodyType>
                    1
                </BodyType>
                <HashAlgorithm>
                    32782
                </HashAlgorithm>
                <SourceQmGuid>
                    5d9fa70a-94b1-4535-9574-f4051fbe3b68
                </SourceQmGuid>
                <TTrq>
                    20170814T163827
                </TTrq>
            </Msmq>
        </se:Header>
        <se:Body>
        </se:Body>
    </se:Envelope>

     

    The Body section is empty, does it imply theres something wrong with my context code?

     

  5. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    324 posts

    Posted 16 Aug 2017 Link to this post

    Hello,

    Have you tried opening the port defined in the multicast address - in your case 666?
    Is this the right IP address as well?
    I have dug out an old blog post discussing some important details out IIS hosting and MSMQ queue locking. Take a look at it.
    Also here is a list of all ports used my MSMQ that may be helpful for configuring your firewall.

    Regards,
    Viktor Zhivkov
    Progress Telerik
    Telerik Data Access is no longer being developed. For more information please refer to this page.
  6. AndrePereira
    AndrePereira avatar
    6 posts
    Member since:
    Apr 2015

    Posted 16 Aug 2017 in reply to Viktor Zhivkov Link to this post

    I'm a bit confused, about your question about the right IP address.

    I just copied that bit of code from the Telerik tutorial. 

     

    Is the Multicast IP address supposed to be a specific machine? If yes, which one?

    Maybe that is what I am not understanding...

     

  7. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    324 posts

    Posted 25 Aug 2017 Link to this post

    Hi Andre,

    The multicast IP address is OK, I was not aware that it is reserved multicast portion of the IP range.
    I am afraid that I have no other ideas what is causing the issue.

    Regards,
    Viktor Zhivkov
    Progress Telerik
    Telerik Data Access is no longer being developed. For more information please refer to this page.
Back to Top