Ingredients

15 cloves 

15 pink peppercorns 

2/3 cup distilled white vinegar 

2 cups finely diced red onion (about 1 large onion) 

1 teaspoon crushed red-pepper flakes 

1 1/2 teaspoons kosher salt 

2 cups sugar 

2 tablespoons finely grated peeled fresh ginger 

3 tablespoons finely grated lime zest, plus 2/3 cup fresh lime juice (from about 4 limes) 

7 mangoes, (7 1/2 pounds total) peeled, pitted, and cut into 1/2-inch chunks 

Preparation

Cut a 4-inch square of cheesecloth. Place cloves and peppercorns in center, and form a bundle; secure with kitchen twine. Place bundle in a low-sided 6-quart saucepan. Add vinegar, red onion, red-pepper flakes, salt, and sugar. Bring to a boil, then reduce heat to medium-low and simmer 15 minutes, stirring occasionally.

Stir in ginger, lime zest and juice, and mangoes. Continue to simmer over medium until mangoes begin to soften and liquid has thickened, about 40 minutes. Remove from heat. Transfer to a large bowl set over an ice-water bath to cool; refrigerate in an airtight container up to 1 month.