Rikki-tikki is a mongoose and the protagonist of "Rikki-Tikki-Tavi" (go figure, right?). The story revolves around his battle to protect the bungalow and garden from the cobras, but depending on how we read the story, we see Rikki-tikki playing roles that are very at odds with each other.
So, there once was a dude named Joseph Campbell who came up with this concept of the hero with a thousand faces. Basically, this is the name Campbell gave to his conception of the archetypal hero, someone who shares many traits with other heroes from different ages and across various cultures. Some of these recurring traits include:
(Are you thinking this all sounds pretty familiar? We aren't the only ones who are fans of Joseph Campbell.)
No, Rikki-tikki doesn't have all of these traits. There is nothing unusual about his birth. In fact, the narrator makes it clear that Rikki-tikki was born a plain and "true mongoose" (7). But an archetypal hero doesn't need all of the traits for him to be an archetypal hero, and Rikki-tikki fits a lot of the bill:
Although he's a mongoose and his world only stretches as far as a garden and a bungalow, we think Rikki-tikki is a classic hero with the best of them.
But there's another way to consider Rikki-tikki. From a postcolonial perspective, Rikki-tikki can be viewed as a subject of colonial rule. Consider this excerpt from Kipling's poem "The White Man's Burden":
Take up the White Man's burden—
And reap his old reward:
The blame of those ye better,
The hate of those ye guard—
The cry of hosts ye humour
(Ah, slowly!) toward the light:—
"Why brought he us from bondage,
Our loved Egyptian night?" (source)
The poem speaks to what Kipling called the white man's burden, a rally cry for Imperialist British society to civilize so-called "primitive" societies. According to Kipling, no matter how much the other societies may hate British rule, civilizing will ultimately be for their benefit. Or, as K.B. Rao put it, Kipling wanted to "portray the heroism and self-sacrifice of Englishmen working in India for the empire" and promote imperialism as the great cause (source).
Now consider this quote from "Rikki-Tikki-Tavi:
[…] because every well-brought-up mongoose always hopes to be a house-mongoose some day and have rooms to run about it, and Rikki-tikki's mother (she used to live in the General's house at Segowlee) had carefully told Rikki what to do if ever he came across white men. (17).
Unlike the free-willed hero above, here Rikki-tikki seems like someone who has given up his traditional role as an Indian for the comforts of colonial rule. He desires to become domesticated but not just by anyone. His mother specifically tells him to seek out and come into the good graces of the imperialist conquerors. So he protects the British family from the native dangers in exchange for the comforts of their home.
In this light, Rikki-tikki is the "burden"—and he's working with his colonialist overlords to civilize and sanitize the garden for the British family. The cobras, which stand in opposition to such change, must be eliminated because they are getting in the way of the British's family's desire to live in the garden. (And never mind that the cobras lived in India first.)
In this light, Rikki-tikki is less a hero fighting for the protection of the family than a subject fighting to introduce the presence of his colonial masters to the land.