Harpaphe Haydeniana
Yellow Spotted Millipede

Keep an eye on the ground and any decaying trees as you’re walking the trails of the Pacific Northwest (and found in Asia also) and you’re likely to see bright yellow spots moving along the ground, look closer and you’ll notice those spots are on the “keels” of a dark millipede about 2 inches long. That’s the yellow-spotted millipede (Harpaphe haydeniana) — AKA almond-scented millipede, AKA cyanide millipede.
The dark coloration with contrasting yellow-tipped keels warn of its ability to exude toxic hydrogen cyanide as a defense. Despite the various common names given the species, the coloration pattern, cyanide defense, and associated almond scent occur in other flat-backed millipedes around the world.
When do they secrete Cyanide?

When it feels threatened they curl into a spiral and exude hydrogen cyanide on you, accompanied by the strong scent of toasted almonds (that’s the smell of cyanide).
Are they Harmful?
The amount of cyanide secreted by an individual millipede is not enough to seriously harm a human, though it may stain the skin or burn and blister if you’re sensitive (wash your hands if you handle one) on the personal note I have plenty of them in my garden as well and have handled many and not faced any problems what so ever (except when they crawl into living space, I just shoo them away). This amount is lethal, however, to birds and rodents.
Are they Helpful?
Yes it is an important part of the forest ecosystem, breaking down leaf litter and freeing its nutrients for other organisms. It is commonly associated with redwood forests where many individuals may be found within a small area. Immature millipedes feed on humus.
“To a gardener, a soil that harbors Cyanide Millipede is worth a gold bullion.”
Malay Chetan Mehta
In fact they are absolutely critical to good soil health and must be conserved. They are so vital that they recycle/eat almost 33% to 50% of all the leaf litter (it could be other decaying plant matter as well, or for that matter it could be animal dung also). For a millipede, eating is a complex process – they crush their food, filter it, and crush it again increasing the availability of nutrients many thousand-fold. The millipede uses the nutrients it needs and then excretes much of that rich nutrient load onto the forest floor where it becomes part of a complex food web.
References for this article/Credits;