Skip to content
November 22, 2020 / kiranpatils

SXA Frontend (FED)-Backend (BED) Development Flow

I had a great time speaking at SUG Pune on SXA Frontend (FED)-Backend (BED) Development Flow

In case you missed to attend, You can go through following recording:

Key Slides:

Hope this helps you simplify your SXA FED-BED experience!

November 22, 2020 / kiranpatils

My Journey to become Sitecore MVP

I had great time speaking with Tamas Varga on my journey to become Sitecore MVP.

https://coresampler.fm/81

October 26, 2020 / kiranpatils

Sitecore Azure Real-world Learnings

Challenge

I know you must be thinking, Isn’t it too late to post about this? as Sitecore released support for Docker and everyone is moving towards the container.

I also thought the same, As we’ve been doing Azure PaaS for the last ~3 years. I’ve been fortunate enough to work on various challenging situations for which there is no documentation available on the web.

I’ve been noticing that the Sitecore community is still learning Azure and people have a lot of questions about how Azure PaaS works. While I think the world will move to Docker in a couple of years. But till then existing deployed Azure PaaS solutions will need support as well as there will be few clients who will not be comfortable going with docker till they see Sitecore Community and Industry feedback.

This post should help you resolve your present Sitecore Azure PaaS challenges/questions.

Solution

Basics

If you are new to Azure PaaS, Then I would strongly recommend you go through the Azure 900 Fundamentals course. This course will give you basic knowledge of Azure offerings and this fundamental knowledge will surely help you. This post has explained it nicely: https://tothecore.sk/2020/07/08/microsoft-az-900-azure-fundamentals-exam-study-guide/

For the context of this post, I will not go into the basics of Cloud, Azure PaaS, Sitecore on Azure as I understand the overall community has a good understanding of this. But if you prefer to explain it. Please let me know via comment on this post. And will share basics of Azure PaaS and Sitecore

I’ve divided our learnings in various categories:

Setup

There are various ways you can deploy Sitecore on Azure PaaS.

  1. Marketplace: You can Azure portal to setup environment using Azure Marketplace. This approach is fine for learning and exploring Azure PaaS or for short term needs. For long term and complex needs, we recommend using ARM templates
  2. ARM Templates: As per this approach, you will be able to provision your Azure PaaS environments using ARM Templates. Read more: https://doc.sitecore.com/developers/91/sitecore-experience-manager/en/walkthrough–deploying-a-new-sitecore-environment-to-the-microsoft-azure-app-service.html One thing you have to remember is Sitecore’s ARM Templates: https://github.com/Sitecore/Sitecore-Azure-Quickstart-Templates/ only provision Sitecore roles and not networking components. So, you might need some manual efforts around it.

Reference links:

Quick comparison of IaaS vs PaaS

IaaS WayPaaS Way
Remote desktop to Sitecore ServerAccess Azure Portal
Check logsCheck logs using
– KUDU/Application Editor
– Application Insights
– AzureTools.aspx
Check CPU/MemoryCheck CPU/Memory using KUDU Console
Check Event logsCheck Event logs using – Diagnose and Solve Problems
Generate Memory dumpGenerate dump
– Diagnose and Solve Problems
– KUDU
Restart App PoolRestart app from Portal
Add more hardware resources Upgrade Tier
Make a quick file change– KUDU
– Application Editor
Add new CD ServerScale

Other setup related learnings:

  1. Tiers: As per my experience. This is the place where it needs more planning and research due to the nature of the Azure world – Where things evolve over the night as well as your solution’s complexity and user load.
    1. https://kb.sitecore.net/articles/835916 – Sitecore team has done a good job documenting these and provide those in default ARM Templates. But use them as a base and try to update it as per your need and Azure world updates.
    2. https://azure.microsoft.com/en-us/blog/azure-app-service-premium-tier/ – Standard Tier and Premium tier at the same rate with better hardware!
    3. https://azure.microsoft.com/en-us/updates/announcing-pricing-decrease-for-azure-app-service-on-the-premium-plan/Price reduction of 35%
  2. Elastic pool: OOTB ARM Template doesn’t come with Elastic Pool. But Elastic Pool is the most efficient way to manage your database usage!
    1. https://docs.microsoft.com/en-us/azure/azure-sql/database/elastic-pool-overview
    2. http://blog.baslijten.com/to-elastic-pool-or-not-to-elastic-pool-for-sitecore-on-azure/
  3. Plan your network layer: Before end-users start visiting your awesome site. You need to make sure your app is secure and load balancing is configured. It needs some work. Following are some good resources:
    1. https://doc.sitecore.com/developers/91/sitecore-experience-manager/en/using-azure-application-gateway-to-secure-your-content-delivery-server.html
    2. https://doc.sitecore.com/developers/93/sitecore-experience-manager/en/manage-an-application-gateway.html
    3. https://doc.sitecore.com/developers/91/sitecore-experience-manager/en/create-an-application-gateway.html
    4. https://doc.sitecore.com/developers/91/sitecore-experience-manager/en/azure-waf-and-ase.html
    5. https://suneelsunkara.wordpress.com/2019/01/10/securing-sitecore-deployed-on-azure-web-appspaas-using-application-gatewaywaf-log-analytics-and-azure-monitor/

Once you are done with the above steps. Your site should be ready for the real-world!

But before you do that, Would recommend you go through the following section which talks about performance challenges we faced and it will be good to get those taken care of before you go-live or if you are already live and facing performance issues following section should help you.

Performance and Troubleshooting

  1. Sitecore logs: Where are your Sitecore log files? I’ve seen the majority of people struggling here. There are the following approaches using which you can access your Azure PaaS Sitecore log files:
    1. Application Insights is one way to query log data
    2. https://kb.sitecore.net/articles/911837#AccessingSitecoreLogs – You can also use AzureTools.aspx which is a Client page which queries application insights data [Read more: https://www.sitecoregabe.com/2018/09/azure-paas-sitecore-logs-using-azureailogs.html]
    3. App_Data/logs folder should be able to give you the latest log file. I’ve been using those for my Sitecore 9.3 version. I guess it was not enabled in 9.0.2. Tried to find official information. But was unable to locate it. You can read more about this approach from here: http://sitecore.skowronski.it/sitecore/how-to-get-the-latest-logs-from-azure-with-kudu/
    4. FTP – Personally – I haven’t used this approach. But you can give it a try if you like it!
    5. Good read :
      1. https://jeffdarchuk.com/2019/05/03/dude-wherere-my-logs-azure/
  2. Advanced tools: If the log file is not giving you all information then you might need to use your advanced tools from your armory! Let’s see how you can use those in Sitecore Azure PaaS world:
    1. KUDU is your friend!
    2. Memory/Crash Dump has been my biggest friend for live issue troubleshooting. You can generate a dump using this approach: https://kb.sitecore.net/articles/111669 – Some screenshots are old. But you should be able to figure it out. The initial steps are same.
    3. Application map: If you want to see dependency information getting logged then you should enable application map: https://kb.sitecore.net/articles/201177 – This should be able to help you pinpoint the root cause of an issue.
  3. REDIS timeout: REDIS is critical from a performance point of view. I’ve already shared my learnings on this here: https://sitecorebasics.wordpress.com/2020/02/15/redistimeoutexception-with-sitecore-9-0-2-9-3/
  4. FCN Mode: If your application is crashing and the domain is getting recycled frequently (You can find such information from event logs) then you might be impacted by the FCN issue. Read more about FCN mode here: https://shazwazza.com/post/all-about-aspnet-file-change-notification-fcn/ In Sitecore Media files are stored as a blob in DB and upon the first request, Sitecore creates your media output on the fly and stores it in MediaCache which is filesystem based and if FCN mode is enabled then it will recycle app pool as ASP.NET thinks there are a lot of file system changes happening and app pool should be recycled. It will be good to disable fcnMode in Web.Config. (httpRuntime fcnMode=’Disabled‘). But once you make this change then if you make any quick change in .cshtml or .aspx it won’t be reflected till the next app pool recycle. So, please read more about this before disabling it.
  5. Most important
    1. Stick to basics!
    2. Everything is still Sitecore — So, please apply your older learnings as well e.g. Checking stats.aspx, Event queue etc.

Hope this helps!

Good reads:

October 4, 2020 / kiranpatils

Comparison between Sitecore Custom and SXA Approaches

Challenge

Sitecore supports Various development approaches:

Image Credits and blog reference

If you have been using the Sitecore Custom Development approach for a long time and haven’t heard about SXA yet. I would strongly recommend you to read more about it. You might like my earlier post: Sitecore SXA Basics

Or you have already learned about SXA and currently trying to figure out:

  • How can you move from the Sitecore Custom approach to SXA approach?
  • What are various approaches to do something in SXA compared to the Sitecore Custom approach?

Then this post is for you.

When we started exploring SXA. We had similar questions in our mind.

For my mind mapping, I used to compare each SXA approach with the Sitecore Custom Development approach. So, my mind can visualize and understand it.

Sharing Knowledge Quotes. QuotesGram
Image Credits : https://in.pinterest.com/pin/241083386281330040/

Thought to share my learnings with you!

Solution

I’ve listed down the following table, Which compares various approaches for specific requirements.

RequirementSitecore Custom approachSXA approach
Multi siteConfig Driven : https://doc.sitecore.com/developers/100/platform-administration-and-architecture/en/configure-multiple-managed-websites.htmlSitecore Item Driven : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/manage-multiple-sites-with-the-sxa-site-manager.html   https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/tenants.html
LayoutNeeds custom developmentOOTB : https://doc.sitecore.com/users/sxa/100/sitecore-experience-accelerator/en/layout.html
Page DesignConfigured on Template’s standard valuehttps://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/recommendations–structuring-pages.html#UUID-d7d17364-b635-606b-41df-eb2f39df385e_section-idm46212287364752_body   https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/page-designs.html
ComponentsNeeds custom developmentOOTB Various Components are already available : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/components.html   And it also allows you to tailor it as per your needs or create your custom component   Customize OOTB Component’s views per site : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/customize-rendering-html-per-site.html   You can also clone rendering : https://www.markvanaalst.com/blog/sxa/making-changes-to-standard-sxa-components/ Note: Has initial learning curve.
SearchNeeds custom developmentOOTB SXA Search Components and Services : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/search.html
Custom Link ResolverConfig Driven : https://jammykam.wordpress.com/2015/02/03/site-specific-link-provider-for-multi-site-implementation-in-sitecore/Sitecore Item Driven : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/add-and-select-a-custom-link-provider.html
WorkflowNeed to assign at Template LevelSXA 10.0 : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/assign-a-data-source-workflow-action-in-sxa.html   Earlier version (Rule based and custom development) : https://www.mastertoweb.com/blog/assign-default-workflows-to-sxa-items-without-creating-new-templates/
SecurityNeeds custom development and configurationhttps://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/set-up-security-for-a-tenant-and-a-site.html
Site CloningNeeds custom developmentOOTB : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/clone-an-sxa-site.html
Front end – Back end integrationFED and BED works in isolated mannerCreative Exchange Live : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/working-with-creative-exchange.html   SXA 9.3 : https://www.markvanaalst.com/blog/sxa/installing-the-sitecore-sxa-cli/   Note: Has initial learning curve.
ThemeNeeds custom development and mostly coming from file systemOOTB : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/the-sxa-themes.html
Sitemap/Robots.txtNeeds custom development or Marketplace moduleOOTB : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/configure-a-sitemap.html
Error PageNeeds custom development or Marketplace modulehttps://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/generate-a-custom-static-error-page.html
Page output as JSONNeeds custom developmentOOTB : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/use-the-sxa-layout-service-to-model-your-pages-in-json.html
CachingNeeds to do it at each component or item levelItem Driven OOTB Configurations : https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/set-sxa-caching-options.html

You can also locate this table from following sources:

Google Doc can be located from here

Have I missed any requirements? You would like to contribute your learning to this document? Please let me know, I will give you edit rights to update Google doc.

Hope this document helps you reduce your SXA learning curve.

Happy SXA Development! 🙂

October 4, 2020 / kiranpatils

SXA Pipelines Cheatsheet

Challenge:

Pipelines have been core of Sitecore’s basic architecture. As SXA has been built on Sitecore architecture it is also following those footsteps.

We’ve recently solved a few interesting use cases using SXA Pipelines. The SXA Pipelines document (https://doc.sitecore.com/developers/sxa/93/sitecore-experience-accelerator/en/the-sxa-pipelines.html) has lot of great information. But it’s hard to locate this page as well as visualize all these pipelines (At least for me).

I was thinking to create something visual which gives you an overview of SXA Pipelines. And that’s how this post came into existence.

Solution:

Reference: https://doc.sitecore.com/developers/sxa/93/sitecore-experience-accelerator/en/the-sxa-pipelines.html

The SXA Pipeline (9.3)

Hope this helps you visualize all SXA Pipelines. Thanks to the Sitecore team for this: https://doc.sitecore.com/developers/sxa/100/sitecore-experience-accelerator/en/index-en.html#

Happy Sitecore SXA Development! 🙂

%d bloggers like this: