Whisk together brown sugar, paprika, black pepper, salt, garlic powder, onion powder, chili powder, and cayenne powder to make a seasoning rub for the ribs.
Trim the ribs of any excess fat and remove the membrane from the back of the rack. Rub generously with dry rub seasoning on both sides. Wrap the ribs in foil and refrigerate a minimum of 2 hours (optional: refrigerate over-night).
To make the Kansas City BBQ sauce, heat a medium saucepan over medium heat. Melt the butter then add the onion and cook about 5 minutes. Add the garlic and cook until fragrant, about another minute.
Whisk in ketchup, molasses, brown sugar, vinegar, mustard, chili powder, black and cayenne pepper to butter mixture. Bring the saucepan to a boil, then reduce the heat to low and simmer about 30 minutes or until thickened. Be sure to stir frequently. Blend with a hand mixer, if needed, to ensure a smooth sauce.
For low and slow ribs, preheat the grill to 225 degrees F. Place ribs bone side down and cook for 4-5 hours, basting the ribs in the last hour with the barbecue sauce.
For a quicker cook time, preheat the grill to medium or 325-350 degrees F. Place ribs bone side down and good 2.5 - 3 hours, basting the ribs in the last hour with the barbeque sauce.
Remove the thin white skin from the back of each rack of ribs.
Mix all other ingredients (spices, sugar, salt and pepper) in a bowl and use two-thirds of mixture to coat all ribs on both sides. Place on roasting pan and cover in the fridge for 4 to 8 hours. Save the remaining one-third of spice-mixture for later application.
Get grill up to 325 degrees F then place ribs on grill over indirect heat. Grill for about 1.5 hours (back back ribs) or 2 hours (spare ribs or St. Louis-cut ribs). When finished, ribs should have slight bend when lifted and bones should start protruding from ends. Fifteen minutes before cooking time is complete, season ribs with remaining spice-mixture.