"good-humored ridicule," 1650s, from rail (v.1) + -ery, or perhaps from French raillerie, from railler "to tease."
Entries linking to raillery
rail v.1
"complain, speak vehemently and bitterly," late 15c., railen, from Old French raillier "to tease or joke" (15c.), which is perhaps from Old Provençal ralhar "scoff, to chat, to joke," from Vulgar Latin *ragulare "to bray" (source also of Italian ragghiare "to bray"), from Late Latin ragere "to roar," probably of imitative origin. See rally (v.2). Related: Railed; railing.
-ery
word-forming element making nouns meaning "place for, art of, condition of, quantity of," from Middle English -erie, from Latin -arius (see -ary). Also sometimes in modern colloquial use "the collectivity of" or "an example of."